mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-02 10:01:11 +02:00
29527: _git: Make file-completion fallback optional.
This commit is contained in:
parent
3761265e45
commit
f5ba9011f0
2 changed files with 17 additions and 2 deletions
|
@ -3,6 +3,9 @@
|
|||
* 29518: Completion/Unix/Command/_git: Fall back to file
|
||||
completion for unknown sub-commands.
|
||||
|
||||
* 29527: Completion/Unix/Command/_git: Make file-completion
|
||||
fallback optional.
|
||||
|
||||
2011-06-30 Frank Terbeck <ft@bewatermyfriend.org>
|
||||
|
||||
* 29526: Functions/VCS_Info/vcs_info: Set `max-exports' early
|
||||
|
@ -15062,5 +15065,5 @@
|
|||
|
||||
*****************************************************
|
||||
* This is used by the shell to define $ZSH_PATCHLEVEL
|
||||
* $Revision: 1.5384 $
|
||||
* $Revision: 1.5385 $
|
||||
*****************************************************
|
||||
|
|
|
@ -17,6 +17,16 @@
|
|||
#
|
||||
# You could even create a function _git-foo() to handle specific completion
|
||||
# for that command.
|
||||
#
|
||||
# When _git does not know a given sub-command (say `bar'), it falls back to
|
||||
# completing file names for all arguments to that sub command. I.e.:
|
||||
#
|
||||
# % git bar <tab>
|
||||
#
|
||||
# ...will complete file names. If you do *not* want that fallback to be used,
|
||||
# use the `use-fallback' style like this:
|
||||
#
|
||||
# % zstyle ':completion:*:*:git*:*' use-fallback false
|
||||
|
||||
# TODO: There is still undocumented configurability in here.
|
||||
|
||||
|
@ -6025,9 +6035,11 @@ _git() {
|
|||
|
||||
if (( ${+functions[_git-$words[1]]} )); then
|
||||
_git-$words[1]
|
||||
else
|
||||
elif zstyle -T ":completion:${curcontext}:" use-fallback; then
|
||||
_path_files
|
||||
ret=$?
|
||||
else
|
||||
_message 'Unknown sub-command'
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
|
Loading…
Reference in a new issue