如何像在 Linux 中一样在 git bash 中启用按页向上/向下进行历史搜索?

a_g*_*irl 3 windows git-bash

我希望我的 git bash 像 Ubuntu 一样按向上/向下翻页搜索历史记录。

我尝试简单地创建一个 ~/.bashrc :

    "\e[A":history-search-backward
    "\e[B":history-search-forward
Run Code Online (Sandbox Code Playgroud)

或这个:

    "\e[5~": history-search-backward   
    "\e[6~": history-search-forward  
Run Code Online (Sandbox Code Playgroud)

但它不起作用。当然。

有谁知道这可能吗?

a_g*_*irl 8

我编辑了错误的文件。

应该编辑~/.inputrc而不是~/.bashrc

接下来的几行~/.inputrc取得了理想的效果:

    "\e[5~": history-search-backward
    "\e[6~": history-search-forward
Run Code Online (Sandbox Code Playgroud)

感谢cricket_007指出这一点。