mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-24 17:00:32 +02:00
38120: _git: Document the internal helper function __git_ignore_line.
This commit is contained in:
parent
f4dfca490c
commit
33bd9136d6
2 changed files with 15 additions and 0 deletions
|
|
@ -5038,6 +5038,16 @@ __git_describe_commit () {
|
|||
|
||||
# Completion Wrappers
|
||||
|
||||
# '__git_ignore_line $callee "${callee_args[@]}" "${callee_compadd_args[@]}"'
|
||||
# invokes '$callee "${callee_args[@]}" "${callee_compadd_args[@]}"' with
|
||||
# callee_compadd_args modified to exclude positional parameters to the completed
|
||||
# command from being completed. This causes 'git add foo <TAB>' not to offer
|
||||
# 'foo' again.
|
||||
#
|
||||
# Note: This function can't be used to wrap bare 'compadd' calls that use a '--'
|
||||
# argument terminator. It can wrap functions of the form
|
||||
# f() { shift $N; compadd "$@" -a - mymatches }
|
||||
# .
|
||||
(( $+functions[__git_ignore_line] )) ||
|
||||
__git_ignore_line () {
|
||||
declare -a ignored
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue