history-search-multi-word/README.md

83 lines
2.7 KiB
Markdown
Raw Normal View History

2016-05-22 06:58:00 +00:00
## Introduction
Binds `Ctrl-R` to a widget that searches for multiple keywords in `AND` fashion.
In other words, you can enter multiple words, and history entries that match
all of them will be found. Video:
2016-06-09 07:39:23 +00:00
Video  view on [asciinema](https://asciinema.org/a/46371). You can resize the video by pressing `Ctrl-+` or `Cmd-+`.
2016-05-22 06:58:00 +00:00
2016-05-22 18:12:25 +00:00
[![asciicast](https://asciinema.org/a/46371.png)](https://asciinema.org/a/46371)
2016-05-22 07:07:34 +00:00
2016-05-25 06:05:24 +00:00
## News
* 25-05-2016
- Cooperation with
[zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions)
plugin
- Configuration option to set page size, example use:
```zsh
zstyle ":history-search-multi-word" page-size "5"
```
2016-05-25 06:05:24 +00:00
2016-05-22 07:07:34 +00:00
## Installation
2016-06-09 07:24:27 +00:00
The plugin is "standalone", which means that only sourcing it is needed. So to
install, unpack `history-search-multi-word` somewhere and add
```zsh
source {where-hsmw-is}/history-search-multi-word.plugin.zsh
```
to `zshrc`.
If using a plugin manager, then `Zplugin` is recommended, but you can use any
other too, and also install with `Oh My Zsh` (by copying directory to
`~/.oh-my-zsh/custom/plugins`).
2016-05-23 15:58:20 +00:00
### [Zplugin](https://github.com/psprint/zplugin)
Add `zplugin load psprint/history-search-multi-word` to your `.zshrc` file.
Zplugin will handle cloning the plugin for you automatically the next time you
start zsh.
2016-06-09 07:26:17 +00:00
### Antigen
2016-05-22 07:07:34 +00:00
2016-05-23 15:58:20 +00:00
Add `antigen bundle psprint/history-search-multi-word` to your `.zshrc` file.
Antigen will handle cloning the plugin for you automatically the next time you
start zsh. You can also add the plugin to a running zsh with `antigen bundle
psprint/history-search-multi-word` for testing before adding it to your
`.zshrc`.
2016-06-09 07:26:17 +00:00
### Oh-My-Zsh
1. `cd ~/.oh-my-zsh/custom/plugins`
2. `git clone git@github.com:psprint/history-search-multi-word.git`
3. Add history-search-multi-word to your plugin list
2016-06-09 07:26:17 +00:00
### Zgen
Add `zgen load psprint/history-search-multi-word` to your .zshrc file in the same function you're doing your other `zgen load` calls in.
2016-05-22 19:27:39 +00:00
### Manual installation
Copy the file `history-search-multi-word` to your `site-functions` directory and add:
2016-05-22 07:07:34 +00:00
```zsh
2016-05-22 07:13:27 +00:00
autoload history-search-multi-word
2016-05-22 07:07:34 +00:00
zle -N history-search-multi-word
zle -N history-search-multi-word-backwards history-search-multi-word
bindkey "^R" history-search-multi-word
```
to your `~/zshrc`.
2016-05-22 07:33:27 +00:00
## IRC Channel
Channel `#zplugin@freenode` is a support place for all author's projects. Connect to:
[chat.freenode.net:6697](ircs://chat.freenode.net:6697/%23zplugin) (SSL) or [chat.freenode.net:6667](irc://chat.freenode.net:6667/%23zplugin)
and join #zplugin.
Following is a quick access via Webchat [![IRC](https://kiwiirc.com/buttons/chat.freenode.net/zplugin.png)](https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin)