2021-05-04 01:59:31 +00:00
|
|
|
# History Substring Search
|
2012-04-04 13:20:34 +00:00
|
|
|
|
2021-05-04 01:59:31 +00:00
|
|
|
Integrates [`zsh-history-substring-search`][1] into Prezto, which implements the
|
|
|
|
[Fish shell][2]'s history search feature, where the user can type in any part of
|
|
|
|
a previously entered command and press up and down to cycle through matching
|
|
|
|
commands.
|
2012-06-14 21:17:36 +00:00
|
|
|
|
2021-05-05 17:59:01 +00:00
|
|
|
If this module is used in conjunction with the [_`syntax-highlighting`_][3]
|
|
|
|
module, this module must be loaded _after_ the _`syntax-highlighting`_ module.
|
2012-06-14 21:17:36 +00:00
|
|
|
|
2021-05-04 01:59:31 +00:00
|
|
|
## Contributors
|
2012-06-14 21:17:36 +00:00
|
|
|
|
|
|
|
New features and bug fixes should be submitted to the
|
2021-05-04 01:59:31 +00:00
|
|
|
[`zsh-history-substring-search`][1] project according to its rules and
|
2012-06-14 21:17:36 +00:00
|
|
|
regulations. This module will be synchronized against it.
|
2012-04-04 13:20:34 +00:00
|
|
|
|
2021-05-04 01:59:31 +00:00
|
|
|
## Settings
|
2012-04-04 13:20:34 +00:00
|
|
|
|
|
|
|
### Case Sensitivity
|
|
|
|
|
2012-03-28 16:41:39 +00:00
|
|
|
To enable case-sensitivity for this module only, add the following line to
|
2021-05-05 17:59:01 +00:00
|
|
|
_`${ZDOTDIR:-$HOME}/.zpreztorc`_:
|
2012-04-04 13:20:34 +00:00
|
|
|
|
2017-07-21 01:07:29 +00:00
|
|
|
```sh
|
|
|
|
zstyle ':prezto:module:history-substring-search' case-sensitive 'yes'
|
|
|
|
```
|
2012-04-04 13:20:34 +00:00
|
|
|
|
|
|
|
### Highlighting
|
|
|
|
|
2021-05-05 17:59:01 +00:00
|
|
|
If colors are enabled, _history-substring-search_ will automatically highlight
|
2012-04-04 13:20:34 +00:00
|
|
|
positive results.
|
|
|
|
|
2021-05-05 17:59:01 +00:00
|
|
|
To disable highlighting for this module only, add the following line to
|
|
|
|
_`${ZDOTDIR:-$HOME}/.zpreztorc`_:
|
2012-04-04 13:20:34 +00:00
|
|
|
|
2017-07-21 01:07:29 +00:00
|
|
|
```sh
|
2021-05-05 17:59:01 +00:00
|
|
|
zstyle ':prezto:module:history-substring-search' color 'no'
|
2017-07-21 01:07:29 +00:00
|
|
|
```
|
2012-04-04 13:20:34 +00:00
|
|
|
|
2021-05-05 17:59:01 +00:00
|
|
|
To set the query found color, add the following line to
|
|
|
|
_`${ZDOTDIR:-$HOME}/.zpreztorc`_:
|
2012-12-23 21:54:43 +00:00
|
|
|
|
2017-07-21 01:07:29 +00:00
|
|
|
```sh
|
|
|
|
zstyle ':prezto:module:history-substring-search:color' found ''
|
|
|
|
```
|
2012-12-23 21:54:43 +00:00
|
|
|
|
2021-05-05 17:59:01 +00:00
|
|
|
To set the query not found color, add the following line to
|
|
|
|
_`${ZDOTDIR:-$HOME}/.zpreztorc`_:
|
2012-12-23 21:54:43 +00:00
|
|
|
|
2017-07-21 01:07:29 +00:00
|
|
|
```sh
|
|
|
|
zstyle ':prezto:module:history-substring-search:color' not-found ''
|
|
|
|
```
|
2012-12-23 21:54:43 +00:00
|
|
|
|
2021-05-05 17:59:01 +00:00
|
|
|
To set the search globbing flags, add the following line to
|
|
|
|
_`${ZDOTDIR:-$HOME}/.zpreztorc`_:
|
2012-12-23 21:54:43 +00:00
|
|
|
|
2017-07-21 01:07:29 +00:00
|
|
|
```sh
|
|
|
|
zstyle ':prezto:module:history-substring-search' globbing-flags ''
|
|
|
|
```
|
2012-12-23 21:54:43 +00:00
|
|
|
|
2021-05-04 01:59:31 +00:00
|
|
|
## Authors
|
2012-04-04 13:20:34 +00:00
|
|
|
|
2021-05-05 17:59:01 +00:00
|
|
|
_The authors of this module should be contacted via the [issue tracker][4]._
|
2012-04-04 13:20:34 +00:00
|
|
|
|
2021-05-04 01:59:31 +00:00
|
|
|
- [Suraj N. Kurapati](https://github.com/sunaku)
|
|
|
|
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
2012-04-04 13:20:34 +00:00
|
|
|
|
2012-06-14 21:17:36 +00:00
|
|
|
[1]: https://github.com/zsh-users/zsh-history-substring-search
|
2021-05-04 01:59:31 +00:00
|
|
|
[2]: https://fishshell.com
|
2021-05-05 17:59:01 +00:00
|
|
|
[3]: ../syntax-highlighting#readme
|
|
|
|
[4]: https://github.com/sorin-ionescu/prezto/issues
|