From: Joey Hess Date: Thu, 26 Jun 2008 22:12:07 +0000 (-0400) Subject: remember mr switches X-Git-Url: https://git.madduck.net/code/myrepos.git/commitdiff_plain/3cba68134c64156e30c1c19148c1e73990e7a2f1 remember mr switches --- diff --git a/mr b/mr index 06b58e3..2e5b03d 100755 --- a/mr +++ b/mr @@ -381,7 +381,7 @@ my %configfiles; my %knownactions; my %alias; my (@ok, @failed, @skipped); -my @SWITCHES=@ARGV; +my @switches=@ARGV; main(); @@ -540,7 +540,7 @@ sub action { #{{{ if ($ret >> 8 != 0) { print STDERR "mr $action: command failed\n"; if (-e "$ENV{HOME}/.mrlog" && $action ne 'remember') { - @ARGV=(@SWITCHES, $action); + @ARGV=(@switches, $action, @ARGV); action("remember", $dir, $topdir, $subdir); } } @@ -1183,7 +1183,7 @@ sub main { #{{{ #use Data::Dumper; print Dumper(\%config); my $action=shift @ARGV; - @SWITCHES = grep { $_ ne $action } @SWITCHES; + @switches = grep { $_ ne $action } @SWITCHES; $action=expandaction($action); dispatch($action);