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

Re: _complete: insert unambiguous when globbing



On Wed, Jan 5, 2022 at 12:15 PM Tomasz Pala <gotar@xxxxxxxxxx> wrote:
>
> OK, this was pretty straightforward:
>
> if [[ $PREFIX = *'*'* ]]; then
>         compstate[pattern_insert]=not_menu
>         _eat_asterisk=true
> elif [ "$_eat_asterisk" = 'true' ]; then
>         compstate[old_list]=keep
> fi

If the solution with the _match completer doesn't work for you, my
suggestion for the above would be to use

if [[ $PREFIX = *[*?\[\]]* ]]; then

to cover more glob operators than just "*".

> Having said that - does this behaviour deserve upstreaming with it's own
> zstyle, or is it too hacky?

I'd say you need to demonstrate how this differs from the
insert-unambiguous style before we can make a determination.




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