Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] git rebase --exec completion
- X-seq: zsh-workers 34886
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] git rebase --exec completion
- Date: Mon, 13 Apr 2015 20:49:24 +0000
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=L9j 0m/brQ70gbxyi5z4nWPPNlzE=; b=nw1jkK4RY9hLqOY/l0E0MhmJkaBRO4aLFRS SYJUh8XIb8SyUOyPmkY9SjP8hMG0POe6D65w+/mXP4uiMMuLZkDOxk4j/7dDkdgX SkX7Uhu5yGTT5tvCJZkPSlCqXKtGKD3+2t1oLRPGgL4BDi99ZltvFdXkOHr6VaYM VeN2GhOQ=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=L9 j0m/brQ70gbxyi5z4nWPPNlzE=; b=MKBgZIIdU4la6HtisCyJoDIDeYV0PYyX1c Lw2FKX5iFuLPNTiM3xZI7ttjFi+dAZzxKGswFcLHn68aZuP0SH2YJiRGNHFEBLfG nyd52NTwQ3nvn58XnNu8wrvmJzsC7XZlTyaYjZjgPi9jF3XT9KotIRnhwpmAFGNl q2aNWRLUM=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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]' \
Messages sorted by:
Reverse Date,
Date,
Thread,
Author