summaryrefslogtreecommitdiff
path: root/Completion/Base/Completer/_expand
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Base/Completer/_expand')
-rw-r--r--Completion/Base/Completer/_expand7
1 files changed, 6 insertions, 1 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 ||