* 'ignore-line yes' style semantics?
@ 2011-05-08 19:52 Ole Jørgen Brønner
2011-05-08 20:09 ` Mikael Magnusson
0 siblings, 1 reply; 6+ messages in thread
From: Ole Jørgen Brønner @ 2011-05-08 19:52 UTC (permalink / raw)
To: zsh-users
[-- Attachment #1: Type: text/plain, Size: 1472 bytes --]
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 #2: ignore-line-yes.zsh --]
[-- Type: application/octet-stream, Size: 190 bytes --]
autoload -Uz compinit
compinit
zstyle ':completion:*:(mv|rm|kill|diff):*' ignore-line yes
cd /tmp
touch prefix
touch prefix_important
ls prefix*
echo "now do"
echo "rm prefix<tab>"tab
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 'ignore-line yes' style semantics?
2011-05-08 19:52 'ignore-line yes' style semantics? Ole Jørgen Brønner
@ 2011-05-08 20:09 ` Mikael Magnusson
2011-05-08 22:45 ` Ole Jørgen Brønner
2011-05-08 22:46 ` Ole Jørgen Brønner
0 siblings, 2 replies; 6+ messages in thread
From: Mikael Magnusson @ 2011-05-08 20:09 UTC (permalink / raw)
To: Ole Jørgen Brønner; +Cc: zsh-users
2011/5/8 Ole Jørgen Brønner <olejorgenb@yahoo.no>:
> 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
>>
>> Finally, if the style is set to other, no word apart from
>> the current one will be considered as a possible completion.
Did you paste this manpage extract as a way of saying "never mind, I
found the answer"? But then why did you press send? Color me confused.
--
Mikael Magnusson
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 'ignore-line yes' style semantics?
2011-05-08 20:09 ` Mikael Magnusson
@ 2011-05-08 22:45 ` Ole Jørgen Brønner
2011-05-08 22:46 ` Ole Jørgen Brønner
1 sibling, 0 replies; 6+ messages in thread
From: Ole Jørgen Brønner @ 2011-05-08 22:45 UTC (permalink / raw)
To: Mikael Magnusson; +Cc: zsh-users
>>> ignore-line
>>>
>>> Finally, if the style is set to other, no word apart from
>>> the current one will be considered as a possible completion.
>
> Did you paste this manpage extract as a way of saying "never mind, I
> found the answer"? But then why did you press send? Color me confused.
>
Hehe :), no just so other people had a quick reference for the current behavior. I want to change it or add an extra option
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 'ignore-line yes' style semantics?
2011-05-08 20:09 ` Mikael Magnusson
2011-05-08 22:45 ` Ole Jørgen Brønner
@ 2011-05-08 22:46 ` Ole Jørgen Brønner
2011-05-12 17:45 ` Mikael Magnusson
1 sibling, 1 reply; 6+ messages in thread
From: Ole Jørgen Brønner @ 2011-05-08 22:46 UTC (permalink / raw)
To: zsh-users
>>> ignore-line
>>>
>>> Finally, if the style is set to other, no word apart from
>>> the current one will be considered as a possible completion.
>
> Did you paste this manpage extract as a way of saying "never mind, I
> found the answer"? But then why did you press send? Color me confused.
>
Hehe :), no just so other people had a quick reference for the current behavior. I want to change it or add an extra option
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 'ignore-line yes' style semantics?
2011-05-08 22:46 ` Ole Jørgen Brønner
@ 2011-05-12 17:45 ` Mikael Magnusson
2011-05-13 6:50 ` Ole Jørgen Brønner
0 siblings, 1 reply; 6+ messages in thread
From: Mikael Magnusson @ 2011-05-12 17:45 UTC (permalink / raw)
To: Ole Jørgen Brønner; +Cc: zsh-users
2011/5/9 Ole Jørgen Brønner <olejorgenb@yahoo.no>:
>>>> ignore-line
>>>>
>>>> Finally, if the style is set to other, no word apart from
>>>> the current one will be considered as a possible completion.
>>
>> Did you paste this manpage extract as a way of saying "never mind, I
>> found the answer"? But then why did you press send? Color me confused.
>>
>
> Hehe :), no just so other people had a quick reference for the current
> behavior. I want to change it or add an extra option
Okay, maybe the text you pasted is obvious to me, but not to you, or I
am completely misunderstanding what you want to do. Does setting the
style to "other" not do exactly what you want?
--
Mikael Magnusson
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 'ignore-line yes' style semantics?
2011-05-12 17:45 ` Mikael Magnusson
@ 2011-05-13 6:50 ` Ole Jørgen Brønner
0 siblings, 0 replies; 6+ messages in thread
From: Ole Jørgen Brønner @ 2011-05-13 6:50 UTC (permalink / raw)
To: zsh-users
On Thu, 12 May 2011 19:45:32 +0200, Mikael Magnusson <mikachu@gmail.com> wrote:
> 2011/5/9 Ole Jørgen Brønner <olejorgenb@yahoo.no>:
>>>>> ignore-line
>>>>>
>>>>> Finally, if the style is set to other, no word apart from
>>>>> the current one will be considered as a possible completion.
>>>
>>> Did you paste this manpage extract as a way of saying "never mind, I
>>> found the answer"? But then why did you press send? Color me confused.
>>>
>>
>> Hehe :), no just so other people had a quick reference for the current
>> behavior. I want to change it or add an extra option
>
> Okay, maybe the text you pasted is obvious to me, but not to you, or I
> am completely misunderstanding what you want to do. Does setting the
> style to "other" not do exactly what you want?
>
Hm.. that seems indeed to be the case :) I can no longer remember what I thought the 'other' value did. Maybe something like that _only_ the current word (of like, all possible words) would be considered, although that doesn't make sense at all. I can swear I tested it though, but apparently not.
Thanks, and sorry for the last double post
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-05-13 6:56 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-08 19:52 'ignore-line yes' style semantics? Ole Jørgen Brønner
2011-05-08 20:09 ` Mikael Magnusson
2011-05-08 22:45 ` Ole Jørgen Brønner
2011-05-08 22:46 ` Ole Jørgen Brønner
2011-05-12 17:45 ` Mikael Magnusson
2011-05-13 6:50 ` Ole Jørgen Brønner
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).