Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Changing subword-range according to current completion context
- X-seq: zsh-workers 41980
- From: Yuri D'Elia <wavexx@xxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Changing subword-range according to current completion context
- Date: Fri, 03 Nov 2017 12:52:10 +0100
- Cancel-lock: sha1:hbQ08xiWG2qyYJ2DkaS+DyHspeM=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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