Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Here's an example of what I mean:

In my home dir, I have three directories starting with "work":

$ ls | grep ork

Notice that "WorkProjects" starts with a capital W.

Now, I want to cd into one of them. I typically type "cd work" followed by TAB. Resulting in:

$ cd work
WorkProjects/     workspace/        workspacepython/

Where the first entry is the folder starting with the capital W. I want it to sort it according to best match first, e.g. folders actually starting with "work" case-sensitive first, and then any case-insensitive matches.

Wanted result:

$ cd work
workspace/        workspacepython/     WorkProjects/

Is this possible to change somewhere?

share|improve this question
up vote 1 down vote accepted

I'm afraid the answer to your question is:

  • yes it is possible,
  • btw that is the default behavior
  • so you'll have to check your shell configuration.

try using this:

% zsh -f # starts new shell ignoring all your configuration options
% autoload compinit && compinit # starts the completion system
% cd /tmp && mkdir test && cd test && mkdir work Work wooork
% cd w[TAB]
wooork/ work/    Work/

You'll notice it will list work before it lists Work.

PS: did you notice your shell prompt character is $? Are you using zsh or bash?

share|improve this answer
Yes, you're quite right. It is the default behavior. This actually stems from "oh-my-zsh" which I've been using as well. And in there there is a simple option of case-sensitivity which I had missed. Thanks! – Jonas Kalderstam Apr 10 '14 at 13:34

Your Answer


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.