zsh-users
 help / color / mirror / code / Atom feed
* Zsh completion question
@ 2010-11-12 15:10 Volodya Khomchak
  2010-11-12 16:57 ` Benjamin R. Haskell
  0 siblings, 1 reply; 7+ messages in thread
From: Volodya Khomchak @ 2010-11-12 15:10 UTC (permalink / raw)
  To: zsh-users

Hi,

I have very simple question about Zsh completion.
Situation is next, I have two commands:
    - moc
    - mocp

When I entered `moc` and pressed <TAB> zsh doesn't propose me to
select `moc` or `mocp` command,
instead of it space is added and now file list is shown as completion variants.

How can I fix it to set it in bash like mode ?

Thanks,
Volodya


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Zsh completion question
  2010-11-12 15:10 Zsh completion question Volodya Khomchak
@ 2010-11-12 16:57 ` Benjamin R. Haskell
  2010-11-12 18:31   ` Matias Graña
  0 siblings, 1 reply; 7+ messages in thread
From: Benjamin R. Haskell @ 2010-11-12 16:57 UTC (permalink / raw)
  To: Volodya Khomchak; +Cc: zsh-users

On Fri, 12 Nov 2010, Volodya Khomchak wrote:

> Hi,
>
> I have very simple question about Zsh completion.
> Situation is next, I have two commands:
>    - moc
>    - mocp
>
> When I entered `moc` and pressed <TAB> zsh doesn't propose me to 
> select `moc` or `mocp` command, instead of it space is added and now 
> file list is shown as completion variants.
>
> How can I fix it to set it in bash like mode ?

I was able to reproduce this by setting the zstyle:

zstyle ':completion:*' accept-exact true

That style isn't 'true' by default.  If you set it intentionally, it 
sounds like you don't actually want it.  If something at the system 
level sets it up, you can override it by adding:

zstyle ':completion:*' accept-exact false

somewhere in your startup scripts (e.g. ~/.zshrc).

You can test that it's currently set by looking at the output of:

zstyle -L ':completion:*'

-- 
Best,
Ben


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Zsh completion question
  2010-11-12 16:57 ` Benjamin R. Haskell
@ 2010-11-12 18:31   ` Matias Graña
  2010-11-12 18:49     ` Bart Schaefer
  0 siblings, 1 reply; 7+ messages in thread
From: Matias Graña @ 2010-11-12 18:31 UTC (permalink / raw)
  To: zsh-users

On Fri, Nov 12, 2010 at 1:57 PM, Benjamin R. Haskell <zsh@benizi.com> wrote:
> On Fri, 12 Nov 2010, Volodya Khomchak wrote:
>
>> Hi,
>>
>> I have very simple question about Zsh completion.
>> Situation is next, I have two commands:
>>   - moc
>>   - mocp
>>
>> When I entered `moc` and pressed <TAB> zsh doesn't propose me to select
>> `moc` or `mocp` command, instead of it space is added and now file list is
>> shown as completion variants.
>>
>> How can I fix it to set it in bash like mode ?
>
> I was able to reproduce this by setting the zstyle:
>
> zstyle ':completion:*' accept-exact true
>
> That style isn't 'true' by default.  If you set it intentionally, it sounds
> like you don't actually want it.  If something at the system level sets it
> up, you can override it by adding:
>
> zstyle ':completion:*' accept-exact false
>
> somewhere in your startup scripts (e.g. ~/.zshrc).
>
> You can test that it's currently set by looking at the output of:
>
> zstyle -L ':completion:*'
>
> --
> Best,
> Ben
>

Ben: sorry; I just sent this email only to you while it was intended
for the list. Here it goes again.


I get the same behaviour. I don't set
zstyle ':completion:*' accept-exact true
anywhere I'm aware of. In fact, zstyle -L ':completion:*' does not
show this setting. And, when I set it to false, behaviour changes, so
it was this option indeed.

Best,
Matías


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Zsh completion question
  2010-11-12 18:31   ` Matias Graña
@ 2010-11-12 18:49     ` Bart Schaefer
  2010-11-12 19:09       ` Benjamin R. Haskell
  0 siblings, 1 reply; 7+ messages in thread
From: Bart Schaefer @ 2010-11-12 18:49 UTC (permalink / raw)
  To: zsh-users

On Nov 12,  3:31pm, Matias Graña wrote:
}
} I get the same behaviour. I don't set
} zstyle ':completion:*' accept-exact true
} anywhere I'm aware of. In fact, zstyle -L ':completion:*' does not
} show this setting. And, when I set it to false, behaviour changes, so
} it was this option indeed.

Check the output of

(setopt kshoptionprint; setopt | grep recexact)

The REC_EXACT option determines the default state of the accept-exact
style.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Zsh completion question
  2010-11-12 18:49     ` Bart Schaefer
@ 2010-11-12 19:09       ` Benjamin R. Haskell
  2010-11-14 20:52         ` Matias Graña
  0 siblings, 1 reply; 7+ messages in thread
From: Benjamin R. Haskell @ 2010-11-12 19:09 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: zsh-users

[-- Attachment #1: Type: TEXT/PLAIN, Size: 802 bytes --]

On Fri, 12 Nov 2010, Bart Schaefer wrote:

> On Nov 12,  3:31pm, Matias Graña wrote:
> }
> } I get the same behaviour. I don't set 
> } zstyle ':completion:*' accept-exact true 
> } anywhere I'm aware of. In fact, zstyle -L ':completion:*' does not 
> } show this setting. And, when I set it to false, behaviour changes, so 
> } it was this option indeed.
>
> Check the output of
>
> (setopt kshoptionprint; setopt | grep recexact)

Or, equivalently: set -o | grep recexact


> The REC_EXACT option determines the default state of the accept-exact 
> style.

Thanks for pointing this out.  Seems much more likely.  I had only 
considered things in (roughly):

set -o | egrep 'comp|menu|list'

Looking at things in the completion section of `man zshoptions` would've 
been a better idea.

-- 
Best,
Ben

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Zsh completion question
  2010-11-12 19:09       ` Benjamin R. Haskell
@ 2010-11-14 20:52         ` Matias Graña
  0 siblings, 0 replies; 7+ messages in thread
From: Matias Graña @ 2010-11-14 20:52 UTC (permalink / raw)
  To: Benjamin R. Haskell; +Cc: Bart Schaefer, zsh-users

On Fri, Nov 12, 2010 at 4:09 PM, Benjamin R. Haskell <zsh@benizi.com> wrote:
> On Fri, 12 Nov 2010, Bart Schaefer wrote:
>
>> On Nov 12,  3:31pm, Matias Graña wrote:
>> }
>> } I get the same behaviour. I don't set } zstyle ':completion:*'
>> accept-exact true } anywhere I'm aware of. In fact, zstyle -L
>> ':completion:*' does not } show this setting. And, when I set it to false,
>> behaviour changes, so } it was this option indeed.
>>
>> Check the output of
>>
>> (setopt kshoptionprint; setopt | grep recexact)
>
> Or, equivalently: set -o | grep recexact
>
>
>> The REC_EXACT option determines the default state of the accept-exact
>> style.
>
> Thanks for pointing this out.  Seems much more likely.  I had only
> considered things in (roughly):
>
> set -o | egrep 'comp|menu|list'
>
> Looking at things in the completion section of `man zshoptions` would've
> been a better idea.
>
> --
> Best,
> Ben

Yup, I had a line setting recexact (I took my initial .zshrc from
somewhere I can't recall now; I usually don't know which behaviours
are "optable" or not.)
I don't know about the OP, but this thread was really valuable to me.
Thanks,
Matias


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Zsh completion question
@ 2010-11-12 15:05 Volodya Khomchak
  0 siblings, 0 replies; 7+ messages in thread
From: Volodya Khomchak @ 2010-11-12 15:05 UTC (permalink / raw)
  To: zsh-users

Hi,

I have a very simple question and hope it would be answered very quickly :)
Situation I have 2 commands:


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-11-14 21:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-12 15:10 Zsh completion question Volodya Khomchak
2010-11-12 16:57 ` Benjamin R. Haskell
2010-11-12 18:31   ` Matias Graña
2010-11-12 18:49     ` Bart Schaefer
2010-11-12 19:09       ` Benjamin R. Haskell
2010-11-14 20:52         ` Matias Graña
  -- strict thread matches above, loose matches on Subject: below --
2010-11-12 15:05 Volodya Khomchak

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).