summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-02-19 10:00:20 +0100
committerDaniel Friesel <derf@finalrewind.org>2011-02-19 10:00:20 +0100
commit762dc8f55fc8c202a67c6faf792a6e951dafc5ea (patch)
treecc3438e783175500ad9d225ce4fd291173e03b09
parentd169f65bee90cc8ff01babd00409460ae8b56403 (diff)
Add raps2 list
-rwxr-xr-xbin/raps211
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/raps2 b/bin/raps2
index 8e65546..53ae87b 100755
--- a/bin/raps2
+++ b/bin/raps2
@@ -130,6 +130,16 @@ sub cmd_info {
return;
}
+sub cmd_list {
+ opendir(my $dh, get_xdg_data_file());
+ my @entries = grep { /^[^.]/ } readdir($dh);
+ closedir($dh);
+
+ for my $file (sort @entries) {
+ say $file;
+ }
+}
+
sub create_dot_dirs {
make_path(get_xdg_config_file());
make_path(get_xdg_data_file());
@@ -319,6 +329,7 @@ given ($action) {
when ('dump') { cmd_dump(@args) }
when ('get') { cmd_get(@args) }
when ('info') { cmd_info(@args) }
+ when ('list') { cmd_list(@args) }
}
__END__