inputrc設定をbashrc設定に変換するには?

inputrc設定をbashrc設定に変換するには?

.inputrcできるだけ少数のファイルを修正したいので、必ずしも必要な場合でなければ触れたくありません。したがって、.inputrc行が与えられると良い:

"\e[5~": history-search-backward
"\e[6~": history-search-forward

それらだけを使用してどのように適用できますかbash

このSu投稿bindで読むことができることを示し、ヘルプは次のとおりです.inputrcbind

$ help bind
bind: bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-x keyseq:shell-command] [keyseq:readline-function or readline-command]

history-search-*readline関数のように見えるので、次のことを試しました。

bind "\e[6~":history-search-forward
bind "\e[5~":history-search-backward

Page Up着メロを実行してPage Down印刷してみてください~

inputrc行を使用する一般的な方法はありますかbash

ベストアンサー1

私の場合は、.bashrc次のものが必要です。

bind '"\e[6~": history-search-forward'

おすすめ記事