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.

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.

1 Answer 1

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:

/usr/share/zsh/functions/Completion/Zsh/_cd

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

cd "<Tab>
share|improve this answer

Your Answer

 
discard

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