mirror of
https://github.com/zsh-users/zsh-history-substring-search
synced 2024-09-20 16:19:04 +02: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:
parent
3bbc5a8cfa
commit
591ca3326a
26
README.md
26
README.md
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue