Add comment explaining compl_func_args
parent
fe26adf7ac
commit
fbc8f7ddf4
|
|
@ -63,9 +63,13 @@ function alias_completion {
|
|||
local compl_func="${new_completion/#* -F /}"; compl_func="${compl_func%% *}"
|
||||
# avoid recursive call loops by ignoring our own functions
|
||||
if [[ "${compl_func#_$namespace::}" == $compl_func ]]; then
|
||||
# the completion function stored in compl_func may need argument(s),
|
||||
# in which case they should be provided in compl_func_args (see #1497)
|
||||
local compl_func_args=
|
||||
if [[ $compl_func == _filedir_xspec ]]; then
|
||||
compl_func_args=$alias_cmd
|
||||
fi
|
||||
|
||||
local compl_wrapper="_${namespace}::${alias_name}"
|
||||
echo "function $compl_wrapper {
|
||||
(( COMP_CWORD += ${#alias_arg_words[@]} ))
|
||||
|
|
|
|||
Loading…
Reference in New Issue