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

Changing subword-range according to current completion context



I'd like to fine-tune the way words are interpreted according to the
completion context which was used to expand the word, not to the zle
context.

Is it saved anywhere? Is it possible to correlate the two?

For example, I normally had the following:

select-word-style S
zstyle ':zle:*' word-context '*/*' path '-*' arg
zstyle ':zle:*:path' subword-range '/' 
zstyle ':zle:*:arg' subword-range '='

This allows me to navigate paths easily as well as well as change
assignments in typical long-style arguments.

But I'm bothered that the context is derived according to a glob match I
explicitly defined, and not by the completion function. Seems like I'm
defining the context of each word twice, once for the completer and once
again for zle.



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