Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion contrib/completion/git-completion.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ __gitcomp_file ()
emulate -L zsh

compset -P '*[=:]'
compadd -f -p "${2-}" -- ${(f)1} && _ret=0
compadd -f -p "${2-}" -F __git_file_exclude -- ${(f)1} && _ret=0
}

__gitcomp_direct_append ()
Expand Down Expand Up @@ -261,6 +261,8 @@ __git_zsh_main ()

(( $+opt_args[--help] )) && command='help'

__git_file_exclude=(${words[2,-1]:#${words[CURRENT]}})

words=( ${orig_words[@]} )

__git_zsh_bash_func $command
Expand All @@ -273,6 +275,7 @@ _git ()
local _ret=1
local cur cword prev
local __git_repo_path
local -a __git_file_exclude

cur=${words[CURRENT]}
prev=${words[CURRENT-1]}
Expand Down
Loading