]> git.madduck.net Git - code/myrepos.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

remember mr switches
authorJoey Hess <joey@kodama.kitenet.net>
Thu, 26 Jun 2008 22:12:07 +0000 (18:12 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Thu, 26 Jun 2008 22:12:07 +0000 (18:12 -0400)
mr

diff --git a/mr b/mr
index 06b58e399517f801d011b32302c3f9e5a02cfa37..2e5b03dc983a3f9f64e997eb2569b5cab10c2b0b 100755 (executable)
--- a/mr
+++ b/mr
@@ -381,7 +381,7 @@ my %configfiles;
 my %knownactions;
 my %alias;
 my (@ok, @failed, @skipped);
 my %knownactions;
 my %alias;
 my (@ok, @failed, @skipped);
-my @SWITCHES=@ARGV;
+my @switches=@ARGV;
 
 main();
 
 
 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') {
                        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);
                                }
                        }
                                        action("remember", $dir, $topdir, $subdir);
                                }
                        }
@@ -1183,7 +1183,7 @@ sub main { #{{{
        #use Data::Dumper; print Dumper(\%config);
        
        my $action=shift @ARGV;
        #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);
        $action=expandaction($action);
 
        dispatch($action);