6
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

bashでCtrl+wでパス文字列を/ごとに削除する

Posted at

求める挙動

$ cd /home/me/test/a_dir/    # Ctrl+w
$ cd /home/me/test/          # Ctrl+w
$ cd /home/me/               # ...

設定

stty werase undef
bind '\C-w:unix-filename-rubout'

1行目で既存のCtrl-wの割当てを削除し,2行目で改めて機能を割り当てています.

参考サイト

設定はこちらから引用させて頂いています.
http://unix.stackexchange.com/questions/27927/is-it-possible-to-configure-ctrl-w-delete-word

タイトルはこちらから頂きました
http://qiita.com/isaoshimizu/items/3d69e8a847266a0d598e

6
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?