Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH] _git: auto-removable '..' suffix: remove at the end of lines



Make sure
  $ git log mast<tab><return>
results in
  $ git log master
and not
  $ git log master..
---
 Completion/Unix/Command/_git | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index b082bb0..606b5e0 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -5602,7 +5602,7 @@ __git_commit_ranges () {
   if compset -P '*..(.|)'; then
     __git_commits $*
   else
-    compset -S '..*' || suf=( -qS .. -r '.@~ ^:' )
+    compset -S '..*' || suf=( -S .. -r '.@~ ^:\t\n\-' )
     __git_commits $* $suf
   fi
 }
-- 
1.9.1.286.g5172cb3



Messages sorted by: Reverse Date, Date, Thread, Author