Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Bash's meta-delete will remove one path component instead of the entire path. How do you get zsh to behave like that?

I found this, which seems to work. Is this the right thing to do?

One of the things I most missed about bash when first switching to Zsh was that M-b and M-f (backward-word and forward-word) would jump over an entire /path/location, rather than to each word separated by a '/'. To make the behavior more like bash, you can evaluate this command: export WORDCHARS=''

http://zshwiki.org/home/zle/bindkeys

share|improve this question

2 Answers 2

up vote 4 down vote accepted

This is duplicate with this question on SO.

One solution is to add the following to your .zshrc

autoload -U select-word-style
select-word-style bash
share|improve this answer

Seems like export WORDCHARS='' does the job.

share|improve this answer

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.