Super User is a question and answer site for computer enthusiasts and power users. 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

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
up vote 5 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .