Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

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

On Mac OS X 10.6, zsh. I have set in .zshrc:

setopt automenu

…to get a completion menu below the prompt. When I type:

cd <TAB>

I see a completion menu with all directories that have spaces in their names having those spaces escaped with a backslash. I would like them to be displayed without the escaping backslash for better readability. This works in bash and in tcsh and when I do run ls from zsh. I don't see the ugly slashes.

The actual line on the prompt of course needs those escaped spaces for the command to work, but the list of directories below shouldn't show them escaped.

Can anyone demonstrate how to achieve this? I have not found a setting to change the output in the completion menu

share|improve this question

migrated from stackoverflow.com May 17 '11 at 12:27

This question came from our site for professional and enthusiast programmers.

I looked around, but there's not much on customizing the cd command. If you really want to go messing around with the completion check out:


However an easier solution would be to just type a " after cd then press Tab:

cd "<Tab>
share|improve this answer

Your Answer


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