diff options
Diffstat (limited to 'Completion')
-rw-r--r-- | Completion/Core/_main_complete | 1 | ||||
-rw-r--r-- | Completion/Core/_path_files | 4 | ||||
-rw-r--r-- | Completion/Core/compinit | 5 |
3 files changed, 6 insertions, 4 deletions
diff --git a/Completion/Core/_main_complete b/Completion/Core/_main_complete index 460b3aba9..304a97828 100644 --- a/Completion/Core/_main_complete +++ b/Completion/Core/_main_complete @@ -60,6 +60,7 @@ comppostfuncs=() _lastdescr=( "\`${(@)^_lastdescr:#}'" ) if [[ compstate[nmatches] -eq 0 && + compstate[matcher] -eq compstate[total_matchers] && -n "$compconfig[warning_format]" && $#_lastdescr -ne 0 ]]; then local str diff --git a/Completion/Core/_path_files b/Completion/Core/_path_files index eb9c06da6..6e23f46aa 100644 --- a/Completion/Core/_path_files +++ b/Completion/Core/_path_files @@ -347,7 +347,7 @@ for prepath in "$prepaths[@]"; do SUFFIX="" fi - if [[ -n $menu ]]; then + if [[ -n $menu || "$compconfig[path_expand]" != *suffix* ]]; then [[ -n "$compconfig[path_cursor]" ]] && compstate[to_end]='' if [[ "$tmp3" = */* ]]; then compadd -Qf -p "$linepath${testpath:q}" -s "/${tmp3#*/}" \ @@ -418,7 +418,7 @@ done exppaths=( "${(@)exppaths:#$orig}" ) -if [[ -n "$compconfig[path_expand]" && +if [[ "$compconfig[path_expand]" = *prefix* && $#exppaths -gt 0 && nm -eq compstate[nmatches] ]]; then PREFIX="${opre}${osuf}" SUFFIX="" diff --git a/Completion/Core/compinit b/Completion/Core/compinit index 16148a945..ca9240f92 100644 --- a/Completion/Core/compinit +++ b/Completion/Core/compinit @@ -368,7 +368,7 @@ compconf() { # Utility function to call a function if it exists. # -# Usage: call <return> <name> [ <args> ... ] +# Usage: funcall <return> <name> [ <args> ... ] # # If a function named <name> is defined (or defined to be autoloaded), # it is called. If <return> is given not the string `-' or empty, it is @@ -385,10 +385,11 @@ funcall() { shift - if builtin functions "$1"; then + if builtin functions "$1" >& /dev/null; then "$@" _ret="$?" [[ -n "$_name" ]] && eval "${_name}=${_ret}" + compstate[restore]='' return 0 fi return 1 |