diff options
| -rw-r--r-- | Changelog | 6 | ||||
| -rwxr-xr-x | bin/hashl | 12 | 
2 files changed, 16 insertions, 2 deletions
@@ -1,4 +1,8 @@ -App::Hashl 0.2 - Mon May 23 2011 +git HEAD + +    * Add "hashl list <regex>" to filter listed files by name + +hashl 0.2 - Mon May 23 2011      * The internal representation of ignored hashes was changed      * hashl update no longer re-adds ignored (but existing) files @@ -341,6 +341,8 @@ sub cmd_info {  }  sub cmd_list { +	my ($re) = @_; +  	printf(  		"# hashl v%s   Read Size %d bytes (%s)\n",  		$VERSION, $hashl->read_size(), $hashl->si_size( $hashl->read_size() ), @@ -348,6 +350,11 @@ sub cmd_list {  	for my $name ( sort $hashl->files() ) {  		my $file = $hashl->file($name); + +		if ( $re and $name !~ m{$re} ) { +			next; +		} +  		printf( "%s %-7s %s\n",  			$file->{hash}, $hashl->si_size( $file->{size} ), $name );  	} @@ -443,10 +450,13 @@ files for B<copy> or B<find-new>.  Show information on I<file> (or the database, if I<file> is not specified). -=item B<list> +=item B<list> [I<regex>]  List all files and their hashes.  The list format is C<< hash size file >>. +If I<regex> (a perl regular expression) is specifed, only matching files will +be listed. +  =item B<list-files>  List all filenames, one file per line.  | 
