git:completion: Fix command not found error
_git has to be loaded before other functions can use its completion functions. Hint to this found at: https://unix.stackexchange.com/a/269818
This commit is contained in:
@@ -38,6 +38,10 @@ compdef nvim-man=man
|
|||||||
# Copy git completion for arguments
|
# Copy git completion for arguments
|
||||||
compdef _git-log glog
|
compdef _git-log glog
|
||||||
compdef _git-checkout git-checkout-worktree
|
compdef _git-checkout git-checkout-worktree
|
||||||
|
# Run git's completion once to avoid a `command not found` error when using the
|
||||||
|
# completion functions on other programs without having completed something for
|
||||||
|
# git before in the same session.
|
||||||
|
_git &>/dev/null || true
|
||||||
|
|
||||||
# Do not sort `git checkout`s completion
|
# Do not sort `git checkout`s completion
|
||||||
zstyle ":completion:*:git-checkout:*" sort false
|
zstyle ":completion:*:git-checkout:*" sort false
|
||||||
|
|||||||
Reference in New Issue
Block a user