mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-21 11:31:15 -03:00
completions/git: add more special refs
These are things like .git/HEAD, i.e. the ones that are typically not namespaced under .git/refs. The list is taken from gitrevisions(7).
This commit is contained in:
@@ -82,7 +82,8 @@ end
|
||||
function __fish_git_heads
|
||||
set -l gitdir (__fish_git rev-parse --git-dir 2>/dev/null)
|
||||
or return # No git dir, no need to even test.
|
||||
for head in HEAD FETCH_HEAD ORIG_HEAD MERGE_HEAD
|
||||
for head in HEAD FETCH_HEAD ORIG_HEAD MERGE_HEAD REBASE_HEAD REVERT_HEAD \
|
||||
CHERRY_PICK_HEAD BISECT_HEAD AUTO_MERGE
|
||||
if test -f $gitdir/$head
|
||||
echo $head
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user