1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-26 16:40:29 +01:00

36247: __git_objects: Complete HEAD:./foo correctly in worktree subdir

This commit is contained in:
Daniel Shahaf 2015-08-19 21:18:08 +00:00
parent 663fa4092f
commit a69994ede1
2 changed files with 8 additions and 1 deletions

View file

@ -1,5 +1,8 @@
2015-08-19 Daniel Shahaf <d.s@daniel.shahaf.name>
* 36247: Completion/Unix/Command/_git: __git_objects: Complete
HEAD:./foo correctly in worktree subdir
* 36237: Completion/Unix/Command/_git: __git_objects: Complete
HEAD:foo correctly in worktree subdir

View file

@ -5740,7 +5740,11 @@ __git_tree_ishs () {
__git_objects () {
compset -P '*:'
if [[ -n $IPREFIX ]]; then
__git_tree_files --root-relative "$PREFIX" "${IPREFIX%:}"
if compset -P ./ ; then
__git_tree_files "$PREFIX" "${IPREFIX%:./}"
else
__git_tree_files --root-relative "$PREFIX" "${IPREFIX%:}"
fi
else
_alternative \
'revisions::__git_revisions' \