diff --git a/mvwrap/mvwrap b/mvwrap/mvwrap index 7a16cc2..f85e6e0 100755 --- a/mvwrap/mvwrap +++ b/mvwrap/mvwrap @@ -15,7 +15,7 @@ use POSIX qw(tmpnam); use Getopt::Long; &cmdline; -&read_cur_dir; +unless (defined @source) { &read_cur_dir; } &lock; if (@pattern) { @@ -213,6 +213,11 @@ sub cmdline { &help if $opt_h; if ($opt_f) { &read_pattern; } + if (defined @ARGV) { + foreach (@ARGV) { + push @source, "$_\n"; + } + } } sub help { @@ -224,7 +229,7 @@ It basically lets you edit the names in a directory with an editor of your choice. By default this will be "vi", but it honors the EDITOR environment variable. Which in turn can be overridden with the -e option. -$0 [options] +$0 [options] [--] [files] At the moment it takes the following options: -h this help message