在 .zshrc 文件添加以下行:
bindkey "^[^[[D" backward-word # bind ``option ←``
bindkey "^[^[[C" forward-word # bind ``option →``其中 ^[^[[D 是我运行 cat 后按 option + ← 的输出结果。
参考:http://stackoverflow.com/questions/12382499/looking-for-altleftarrowkey-solution-in-zsh