From 6f2112f23a4838fd1c52efd16c844142f5407394 Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Fri, 27 Apr 2001 09:12:33 +0000 Subject: try to improve testing for suffix style in _expand; make _path_files fail to complete words like ........ (14133) --- Completion/Base/Completer/_expand | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Completion/Base/Completer') 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 || -- cgit 1.4.1