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:
Chris Hua 2023-03-04 13:47:26 -05:00 committed by Koston-0xDEADBEEF
parent 3bbc5a8cfa
commit 591ca3326a

View file

@ -39,6 +39,30 @@ Using [Oh-my-zsh](https://github.com/robbyrussell/oh-my-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
------------------------------------------------------------------------------
@ -73,6 +97,8 @@ Usage
bindkey "$terminfo[kcuu1]" history-substring-search-up
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:
bindkey -M emacs '^P' history-substring-search-up