diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-02-19 10:00:20 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-02-19 10:00:20 +0100 |
commit | 762dc8f55fc8c202a67c6faf792a6e951dafc5ea (patch) | |
tree | cc3438e783175500ad9d225ce4fd291173e03b09 /bin/raps2 | |
parent | d169f65bee90cc8ff01babd00409460ae8b56403 (diff) |
Add raps2 list
Diffstat (limited to 'bin/raps2')
-rwxr-xr-x | bin/raps2 | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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__ |