Skip to content

Instantly share code, notes, and snippets.

@lehtu
Created December 22, 2022 12:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lehtu/2854b1db4af2e0c677ad8d5800145325 to your computer and use it in GitHub Desktop.
Save lehtu/2854b1db4af2e0c677ad8d5800145325 to your computer and use it in GitHub Desktop.
How to enable partial command history for Git Bash aka Git for windows

Partial Command History for Git BASH

Partial Command History is pretty basic in any *NIX system, but for some reason in Git BASH it's not a default.

What does partial command history mean?

This means that when you type partial command in bash and use arrow up/down keys, it goes through only those commands starting with what you have already typed.

How to:

In your ~/.inputrc file you just need to add key bindings:

"\e[A": history-search-backward
"\e[B": history-search-forward

Next time you start a new bash it will work nicely <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment