From 5c90dfb045ce79d5505c36ec994ed81fa170796b Mon Sep 17 00:00:00 2001 From: Ward Wouts Date: Thu, 30 Aug 2001 12:32:17 +0000 Subject: [PATCH] now it's possible to specify files to use mv_wrap on this may be dangerous! do I check for files which are not in @source? --- mvwrap/mvwrap | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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