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

后端 未结 5 1138
北荒
北荒 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 03:57

    Update .inputrc with the following:

    "\C-[OA": history-search-backward
    "\C-[[A": history-search-backward
    
    "\C-[OB": history-search-forward
    "\C-[[B": history-search-forward
    

提交回复
热议问题