Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: cd /u/N/v/ tab expansion



On Sun, Apr 10, 2022 at 18:27:51 +0200, Tomasz Pala wrote:

> 3. if to be left intact - how to prevent this from happening? The only
> difference I see are MATCH=/ MBEGIN=6 MEND=6.
> 
> 
> The solution I've came works for me, but I got no idea why and if that's
> even the rational way:
> 
> -	[[ -n "$compstate[pattern_match]" ]]			&& SUFFIX="${SUFFIX:s./.*/}*"
> +	[[ -n "$compstate[pattern_match]" ]] && [ -z "$MATCH" ] && SUFFIX="${SUFFIX:s./.*/}*"

This doesn't work reliably... after first use MATCH is set and nothing
unsets it.

-- 
Tomasz Pala <gotar@xxxxxxxxxxxxx>




Messages sorted by: Reverse Date, Date, Thread, Author