How do I change bash history completion to complete what's already on the line?

后端 未结 5 1152
北荒
北荒 2020-12-02 03:54

I found a command a couple of months ago that made my bash history auto-complete on what\'s already on the line when pressing the up arrow:

$ vim fi
         


        
5条回答
  •  温柔的废话
    2020-12-02 04:01

    With ohmyzsh, use this in your .zshrc :

    bindkey '^[OA' history-search-backward
    bindkey '^[OB' history-search-forward
    

    To reload, source ~/.zshrc or relaunch terminal.

    Source: https://superuser.com/a/418299/71680

提交回复
热议问题