Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: git object type detection
- X-seq: zsh-workers 41339
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: Zsh Hackers' List <zsh-workers@xxxxxxx>
- Subject: PATCH: git object type detection
- Date: Wed, 21 Jun 2017 16:46:46 +0100
- Cms-type: 201P
- 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
- Organization: Samsung Cambridge Solution Centre
- References: <CGME20170621154649eucas1p2c9029cf17af4406ce46bdc94ff93e1d6@eucas1p2.samsung.com>
More quoting woes --- I suspect this change needs to be applied in other
places.
git checkout HEAD\^
didn't complete the right set of files after it because it didn't
recognise HEAD\^ as "treeish" because git didn't like the backslash.
Remove that and it works.
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index a46e3b5..f764daf 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -495,8 +495,8 @@ _git-checkout () {
elif [[ -n ${opt_args[(I)-b|-B|-t|--track|--orphan|--detach]} ]]; then
_nothing
- elif [[ -n $line[1] ]] && __git_is_treeish $line[1]; then
- __git_ignore_line __git_tree_files ${PREFIX:-.} $line[1] && ret=0
+ elif [[ -n $line[1] ]] && __git_is_treeish ${(Q)line[1]}; then
+ __git_ignore_line __git_tree_files ${PREFIX:-.} ${(Q)line[1]} && ret=0
else
__git_ignore_line __git_modified_files && ret=0
fi
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author