zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: _git and wrapper aliases
@ 2008-03-09 12:12 Clint Adams
  0 siblings, 0 replies; only message in thread
From: Clint Adams @ 2008-03-09 12:12 UTC (permalink / raw)
  To: zsh-workers

A user has a wrapper script which he is aliasing as "git". The following
change allows him to
alias git=gitwrapper
compdef _git gitwrapper=git

I just woke up, and I have no idea if I've broken anything.

Index: Completion/Unix/Command/_git
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_git,v
retrieving revision 1.60
diff -u -r1.60 _git
--- Completion/Unix/Command/_git	28 Feb 2008 17:20:44 -0000	1.60
+++ Completion/Unix/Command/_git	9 Mar 2008 12:10:14 -0000
@@ -4138,7 +4138,7 @@
     unset tmpwords
   fi
 
-  if [[ $words[1] == git ]]; then
+  if [[ $service == git ]]; then
     local state line
     declare -A opt_args
     _arguments -C \
@@ -4155,12 +4155,12 @@
         __git_aliases_and_commands
         ;;
       (options)
-        curcontext="${curcontext%:*:*}:git-$words[1]:"
-        _call_function ret _git-$words[1]
+        curcontext="${curcontext%:*:*}:git-$service:"
+        _call_function ret _git-$service
         ;;
     esac
   else
-    _call_function ret _$words[1]
+    _call_function ret _$service
   fi
 }
 


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-03-09 12:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-09 12:12 PATCH: _git and wrapper aliases Clint Adams

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).