macOS iTerm2 + Oh My Zsh
iTerm2
比mac下原生terminal更好用的终端,一试便知
iTerm2启用bash快捷键Alt+f,Alt+b
方法一:
profiles->keys中,将“Left option key acts as”修改为“+Esc”即可
方法二:
Preferences---Keys---新增两个键绑定后即可像在linux下一样使用Alt+f,b在命令行上以单词为单位进行移动,实测有效
Option+f ---> Send Escape Sequence ---> f
Option+b ---> Send Escape Sequence ---> b
Option+d ---> Send Escape Sequence ---> d
Option+u ---> Send Escape Sequence ---> u
Oh My Zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
┌─[jlive@MacBook-Pro] - [~] - [2016-09-11 02:49:02]
└─[0]
<>
jlive@MacBook-Pro:~ $zsh
[oh-my-zsh] Random theme '/Users/jlive/.oh-my-zsh/themes/dieter.zsh-theme' loaded...
2:49:06
jlive@MacBook-Pro.local
~