zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] git rebase --exec completion
@ 2015-04-13 20:49 Daniel Shahaf
  0 siblings, 0 replies; only message in thread
From: Daniel Shahaf @ 2015-04-13 20:49 UTC (permalink / raw)
  To: zsh-workers

Complete the argument of 'git rebase --exec' as a command name.

I suppose this could be made smarter similar to how 'su -c <TAB>'
completes entire commands, but that is implemented using states and
compset and I'm reluctant to add such complexity to _git which is
already 300KB by itself.

Incidentally, su -c 'cd && <TAB>' completes nothing, and su -c 'cd foo
&& <TAB>' completes directory names.  Perhaps they could complete a new
command.

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index b11c83c..c724f3c 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -1335,7 +1335,7 @@ _git-rebase () {
     '(-i --interactive --ignore-whitespace --whitespace --committer-date-is-author-date)'{-i,--interactive}'[make a list of commits to be rebased and open in $EDITOR]' \
     '--edit-todo[edit interactive instruction sheet in an editor]' \
     '(-p --preserve-merges --interactive)'{-p,--preserve-merges}'[try to recreate merges instead of ignoring them]' \
-    {-x,--exec=}'[with -i\: append "exec <cmd>" after each line]:command' \
+    {-x,--exec=}'[with -i\: append "exec <cmd>" after each line]:command:_command_names -e' \
     '(1)--root[rebase all reachable commits]' \
     $autosquash_opts \
     '(--autostash --no-autostash)--autostash[stash uncommitted changes before rebasing and apply them afterwards]' \


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

only message in thread, other threads:[~2015-04-13 20:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-13 20:49 [PATCH] git rebase --exec completion Daniel Shahaf

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).