bashからzshへのキーバインディング?

bashからzshへのキーバインディング?

.inputrc私のBashには次の項目があります。

"\C-p": history-search-backward
"\C-n": history-search-forward
"\e[A": history-search-backward
"\e[B": history-search-forward
"\e[C": forward-char
"\e[D": backward-char
"\ew": copy-region-as-kill

私は引っ越したばかりで、zshbashと同じキーバインディングを維持したいと思います。上記の行と同等のものはありますかzsh

ベストアンサー1

Bashでできるほとんどすべての作業はzshと同じですが、翻訳はケースバイケースで処理する必要があります。

zshの行エディタは次のとおりです。ズラー。キーをバインドするコマンドは次のとおりです。bindkey。キーストロークにバインドできる行編集コマンドを呼び出します。小さな部品

# You may want to call different history search commands, e.g.
# down-line-or-history or down-line-or-search (and up-*)
bindkey '^P' history-search-backward
bindkey '^N' history-search-forward
bindkey '\e[A' history-search-backward
bindkey '\e[B' history-search-forward
# The others should work already

おすすめ記事