diff options
Diffstat (limited to 'Completion')
-rw-r--r-- | Completion/Base/Completer/_expand | 7 | ||||
-rw-r--r-- | Completion/Unix/Type/_path_files | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/Completion/Base/Completer/_expand b/Completion/Base/Completer/_expand index 8fcedea96..f3da119e1 100644 --- a/Completion/Base/Completer/_expand +++ b/Completion/Base/Completer/_expand @@ -28,8 +28,13 @@ fi ( "$word" = *\$[a-zA-Z0-9_]## && $+parameters[${word##*\$}] -eq 0 ) ]] && return 1 +### I'm not sure about the pattern to use in the following test. +# It once was: +# [[ "$word" = (\~*/|\$(|[=~#^+])[a-zA-Z0-9_\[\]]##[^a-zA-Z0-9_\[\]]|\$\{*\}?)[^\$\{\}\(\)\<\>?^*#~]# ]] && + zstyle -T ":completion:${curcontext}:" suffix && - [[ "$word" = (\~*/|\$(|[=~#^+])[a-zA-Z0-9_\[\]]##[^a-zA-Z0-9_\[\]]|\$\{*\}?)[^\$\{\}\(\)\<\>?^*#~]# ]] && + [[ "$word" = (\~*/|*\$(|[=~#^+])[a-zA-Z0-9_\[\]]##[^a-zA-Z0-9_\[\]]|*\$\{*\}?) && + "${(e)word}" != *[][^~*?\<\>\{\}\|]* ]] && return 1 zstyle -t ":completion:${curcontext}:" accept-exact || diff --git a/Completion/Unix/Type/_path_files b/Completion/Unix/Type/_path_files index ffaf0d77f..6a30cf2b8 100644 --- a/Completion/Unix/Type/_path_files +++ b/Completion/Unix/Type/_path_files @@ -190,7 +190,7 @@ eorig="$orig" # Now let's have a closer look at the string to complete. -if [[ "$pre" = *(\`[^\`]#\`|\$)*/* && "$compstate[quote]" != \' ]]; then +if [[ "$pre" = [^][*?#^\|\<\>]#(\`[^\`]#\`|\$)*/* && "$compstate[quote]" != \' ]]; then # If there is a parameter expansion in the word from the line, we try # to complete the beast by expanding the prefix and completing anything |