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

'ignore-line yes' style semantics?



Why does 'ignore-line yes' ignore the _current_ word too? If this is somehow useful in some cases, could we get another option ignoring all words except the current one?

I'm almost burned myself when using
    zstyle ':completion:*:(mv|rm|kill|diff):*' ignore-line yes
and doing
    rm someprefix<tab>
in a directory with files 'someprefix' and 'someprefix_important'. In this case someprefix will expand to someprefix_important

(minimal rc file inclued)


ignore-line

	This is tested for each tag valid for the current completion. If it is
	set to true, none of the words that are already on the line will be
	considered as possible completions. If it is set to current, the word
	the cursor is on will not be considered as a possible completion. The
	value current-shown is similar but only applies if the list of
	completions is currently shown on the screen.  Finally, if the style is
	set to other, no word apart from the current one will be considered as a
	possible completion.
	The values current and current-shown are a bit like the opposite of the
	accept-exact style: only strings with missing characters will be
	completed.

	Note that you almost certainly dont want to set this to true or other
	for a general context such as :completion:*. This is because it would
	disallow completion of, for example, options multiple times even if the
	command in question accepts the option more than once.

--
Ole Jørgen Brønner

Attachment: ignore-line-yes.zsh
Description: Binary data



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