Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I love Zsh's tab completions, but it's frustrating when there is only one possible option and I have to tab twice to tab complete the filename.

For example, if this is a list of files in a directory:

- a.txt
- b.txt
- x.txt

and I type cat x<TAB> in ZSH, I get this at the prompt:

$ cat x
x.txt

I have to TAB again to get the value. What can I do to get ZSH to complete the filename with only the first tab?

Here's my setopt:

alwaystoend
autocd
autonamedirs
autopushd
cdablevars
completeinword
correctall
extendedhistory
noflowcontrol
histexpiredupsfirst
histignoredups
histignorespace
histverify
incappendhistory
interactive
longlistjobs
menucomplete
monitor
promptsubst
pushdignoredups
sharehistory
shinstdin
zle
share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

The setting I needed to fix was

zstyle '*' single-ignored show

in the completion.zsh file in oh-my-zsh. I changed it to

zstyle '*' single-ignored complete
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.