summary refs log tree commit diff
path: root/Completion/Base/Completer/_expand
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-27 09:12:33 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-27 09:12:33 +0000
commit6f2112f23a4838fd1c52efd16c844142f5407394 (patch)
tree5b09e20b8a7acb079393480fe739e8b7add03942 /Completion/Base/Completer/_expand
parenta509b259f889404b3c821a19243ebde19d582aaf (diff)
downloadzsh-6f2112f23a4838fd1c52efd16c844142f5407394.tar.gz
zsh-6f2112f23a4838fd1c52efd16c844142f5407394.tar.xz
zsh-6f2112f23a4838fd1c52efd16c844142f5407394.zip
try to improve testing for suffix style in _expand; make _path_files fail to complete words like ...<pat>..<param-subst>... (14133)
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 ||