Created
July 2, 2021 06:40
-
-
Save vasi/87a0cfb60ba334927b7278fb17c3a2cd to your computer and use it in GitHub Desktop.
zshrc local history with arrows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
up-line-or-local-history() { | |
zle set-local-history 1 | |
zle up-line-or-history | |
zle set-local-history 0 | |
} | |
zle -N up-line-or-local-history | |
down-line-or-local-history() { | |
zle set-local-history 1 | |
zle down-line-or-history | |
zle set-local-history 0 | |
} | |
zle -N down-line-or-local-history | |
bindkey '^[OA' up-line-or-local-history | |
bindkey '^[OB' down-line-or-local-history |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment