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'm using oh-my-zsh on Mac OS X with homebrew'ed zsh 4.3.12. I stumbled recently on a weird problem. In scripts/not-used I have several .R files:

breakdowns.R             eventloop.R              process-largeclients.R   process-qt.R
reprocess-pinning.R      calculate-qt-error.R     generate_decision_tree.R process-net.R

However, when I try ls scripts/not-used/+Tab the first completion is ls scripts/not-used/_.R where _ represents cursor position. If I press Tab again, I get this weird completion:

$ ls scripts/not-used/.R                                                                          
breakdowns.R  eventloop.R

How to unset this ugly (wrong) behaviour?

The options that are set are:

alwaystoend autocd autonamedirs autopushd cdablevars completeinword
correctall extendedglob extendedhistory noflowcontrol
histexpiredupsfirst histignoredups histignorespace histreduceblanks histverify
interactive login longlistjobs monitor promptsubst 
pushdignoredups pushdminus pushdsilent pushdtohome
sharehistory shinstdin zle
share|improve this question
how is breakdowns.R eventloop.R incorrect completion? Try unsetting the completeinword option, as this allows completion to be done from both ends of the cursor, left and right. That means, that if I type pac as in pacman, and there's a command called arpac, then arpac will be in the list of completions, since completion occurs on both sides of the cursor instead of only to the right. –  Alexej Magura Dec 23 '13 at 16:53
I wasn't aware of the question... So, breakdowns.R eventloop.R is an incorrect completion, in the sense of incompleteness. If you look closely at the list of files, there are more than just those 2, ending with .R. –  Nikola Knezevic Jul 21 at 6:57
I tried touching into existence a bunch of files with the same names as the ones you listed as well as a z.R, a z,.R and a z_test.R for testing purposes - z_test.R wouldn't show up trying to autocomplete it, but z,.R would. Guessing it's some kind of regex mishap –  Dmitri DB Sep 15 at 19:13

Your Answer


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

Browse other questions tagged or ask your own question.