summaryrefslogtreecommitdiff
path: root/bin/hashl
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-01-07 14:00:34 +0100
committerDaniel Friesel <derf@finalrewind.org>2011-01-07 14:00:34 +0100
commit7ae2890248388904feb29b6a726b24b5c798ea9f (patch)
tree806f4a713bd892395503e920bb5371ba3db5215b /bin/hashl
parent440a9d6874f8f6e26c12d9faf8b5bd96a98e8b35 (diff)
Add hashl list-files
Diffstat (limited to 'bin/hashl')
-rwxr-xr-xbin/hashl5
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/hashl b/bin/hashl
index 223a7c1..084b4d2 100755
--- a/bin/hashl
+++ b/bin/hashl
@@ -356,6 +356,10 @@ sub cmd_list {
}
}
+sub cmd_list_files {
+ say join("\n", sort keys %{$db->{'files'}});
+}
+
sub cmd_list_ignored {
if (exists $db->{'ignored'}->{'hashes'}) {
for my $hash (@{$db->{'ignored'}->{'hashes'}}) {
@@ -380,6 +384,7 @@ given ($action) {
when ('ignore') { cmd_ignore(@ARGV) }
when ('info') { cmd_info(@ARGV) }
when ('list') { cmd_list(@ARGV) }
+ when ('list-files') { cmd_list_files(@ARGV) }
when ('list-ignored') { cmd_list_ignored(@ARGV) }
when ('update') { cmd_update(@ARGV) }
default { usage() }