diff options
Diffstat (limited to 'Completion/Core')
-rw-r--r-- | Completion/Core/_description | 2 | ||||
-rw-r--r-- | Completion/Core/_expand | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/Completion/Core/_description b/Completion/Core/_description index b1b98741c..2c4232ade 100644 --- a/Completion/Core/_description +++ b/Completion/Core/_description @@ -38,6 +38,8 @@ if [[ -z "$_comp_no_ignore" ]]; then case "$hidden" in true|yes|on|1) _comp_ignore=( "$_comp_ignore[@]" "$words[@]" );; current) _comp_ignore=( "$_comp_ignore[@]" "$words[CURRENT]" );; + current-shown) [[ "$compstate[old_list]" = *shown* ]] && + _comp_ignore=( "$_comp_ignore[@]" "$words[CURRENT]" );; other) _comp_ignore=( "$_comp_ignore[@]" "${(@)words[1,CURRENT-1]}" "${(@)words[CURRENT+1,-1]}" );; diff --git a/Completion/Core/_expand b/Completion/Core/_expand index 88a2fb97d..8b0bae95f 100644 --- a/Completion/Core/_expand +++ b/Completion/Core/_expand @@ -55,10 +55,12 @@ exp=("$word") if [[ "$force" = *s* ]] || zstyle -T ":completion:${curcontext}:" substitute; then - exp=( "${(e)exp//\\[ -]/ }" ) + [[ ! -o ignorebraces && "${#${exp}//[^\{]}" = "${#${exp}//[^\}]}" ]] && + eval exp\=\( ${${(q)exp}:gs/\\{/\{/:gs/\\}/\}/} \) + exp=( ${(e)exp//\\[ +]/ } ) else - exp=( "${exp:s/\\\$/\$}" ) + exp=( ${exp:s/\\\$/\$} ) fi # If the array is empty, store the original string again. |