mirror of
https://github.com/zsh-users/zsh-history-substring-search.git
synced 2026-11-11 11:41:49 -05:00
chore: update readme
- adds example for `zplug` - adds example for `antigen` - closes #113 - adds note for alternative binding keys - clsoes #141, $138
This commit is contained in:
committed by
Koston-0xDEADBEEF
parent
3bbc5a8cfa
commit
591ca3326a
@@ -39,6 +39,30 @@ Using [Oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh):
|
|||||||
|
|
||||||
exec zsh
|
exec zsh
|
||||||
|
|
||||||
|
Using [zplug](https://github.com/zplug/zplug):
|
||||||
|
|
||||||
|
1. Add this repo to `~/.zshrc`:
|
||||||
|
|
||||||
|
zplug "zsh-users/zsh-history-substring-search", as: plugin
|
||||||
|
|
||||||
|
Using [antigen](https://github.com/zsh-users/antigen):
|
||||||
|
|
||||||
|
1. Add the `antigen bundle` command just before `antigen apply`, like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
antigen bundle zsh-users/zsh-history-substring-search
|
||||||
|
antigen apply
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Then, **after** `antigen apply`, add the key binding configurations, like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
# zsh-history-substring-search configuration
|
||||||
|
bindkey '^[[A' history-substring-search-up # or '\eOA'
|
||||||
|
bindkey '^[[B' history-substring-search-down # or '\eOB'
|
||||||
|
HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE=1
|
||||||
|
```
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -73,6 +97,8 @@ Usage
|
|||||||
bindkey "$terminfo[kcuu1]" history-substring-search-up
|
bindkey "$terminfo[kcuu1]" history-substring-search-up
|
||||||
bindkey "$terminfo[kcud1]" history-substring-search-down
|
bindkey "$terminfo[kcud1]" history-substring-search-down
|
||||||
|
|
||||||
|
Users have also observed that `[OA` and `[OB` are correct values, _even if_ these were not the observed values.
|
||||||
|
|
||||||
You might also want to bind the Control-P/N keys for use in EMACS mode:
|
You might also want to bind the Control-P/N keys for use in EMACS mode:
|
||||||
|
|
||||||
bindkey -M emacs '^P' history-substring-search-up
|
bindkey -M emacs '^P' history-substring-search-up
|
||||||
|
|||||||
Reference in New Issue
Block a user