On Sat, 24 Feb 2018 20:49:14 +0100
Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
I have some patches I was working on related to this, but I assume
there was still some problem, or I would have committed them...
There's two patches in this thread,
http://www.zsh.org/mla/workers/2015/msg01439.html and then I think I
never sent the third one,
This is all quite complicated so I can well believe it's useful; I don't
think it fixes the behaviour I was seeing (but I may be getting
confused).
On the same theme, I think the following is useful for those of us
using the _expand completer, which may well have nothing whatsoever to
do with the original problem.
pws
diff --git a/Completion/Base/Completer/_expand b/Completion/Base/Completer/_expand
index a6e30e8..ee3681b 100644
--- a/Completion/Base/Completer/_expand
+++ b/Completion/Base/Completer/_expand
@@ -43,7 +43,8 @@ zstyle -s ":completion:${curcontext}:" accept-exact tmp ||
if [[ "$tmp" != (yes|true|on|1) ]]; then
{ [[ "$word" = \~(|[-+]) ||
- ( "$word" = \~[-+][1-9]## && $word[3,-1] -le $#dirstack ) ]] && return 1 }
+ ( "$word" = \~[-+][1-9]## && $word[3,-1] -le $#dirstack ) ||
+ $word = \~\[*\]/* ]] && return 1 }
{ [[ ( "$word" = \~* && ${#userdirs[(I)${word[2,-1]}*]}+${#nameddirs[(I)${word[2,-1]}*]} -gt 1 ) ||
( "$word" = *\$[a-zA-Z0-9_]## &&
${#parameters[(I)${word##*\$}*]} -ne 1 ) ]] && continue=1 }