mirror of
https://github.com/dcarrillo/prezto.git
synced 2024-12-30 13:36:47 +00:00
history-substring-search: Tweak documentation and cleanup
This commit is contained in:
parent
74a19fb665
commit
5ac930d96b
@ -63,18 +63,21 @@ _`${ZDOTDIR:-$HOME}/.zpreztorc`_:
|
||||
|
||||
```sh
|
||||
zstyle ':prezto:module:history-substring-search' globbing-flags ''
|
||||
```
|
||||
|
||||
To set the search matched against the start of each history entry, add the following line to
|
||||
### Case sensitive search
|
||||
|
||||
To set the search case-sensitivity, add the following line to
|
||||
_`${ZDOTDIR:-$HOME}/.zpreztorc`_:
|
||||
|
||||
```sh
|
||||
zstyle ':prezto:module:history-substring-search' prefixed 'yes'
|
||||
zstyle ':prezto:module:history-substring-search' case-sensitive 'yes'
|
||||
```
|
||||
|
||||
### Fuzzy search
|
||||
|
||||
To enable fuzzy search add the following line to
|
||||
`${ZDOTDIR:-$HOME}/.zpreztorc`_:
|
||||
To enable search for fuzzy matches, add the following line to
|
||||
_`${ZDOTDIR:-$HOME}/.zpreztorc`_:
|
||||
|
||||
```sh
|
||||
zstyle ':prezto:module:history-substring-search' fuzzy 'yes'
|
||||
@ -82,11 +85,20 @@ zstyle ':prezto:module:history-substring-search' fuzzy 'yes'
|
||||
|
||||
### Unique results
|
||||
|
||||
To retrieve only unique results (remove duplicates) add the following line to
|
||||
`${ZDOTDIR:-$HOME}/.zpreztorc`_:
|
||||
To enable unique results, add the following line to
|
||||
_`${ZDOTDIR:-$HOME}/.zpreztorc`_:
|
||||
|
||||
```sh
|
||||
zstyle ':prezto:module:history-substring-search' ensure-unique 'yes'
|
||||
zstyle ':prezto:module:history-substring-search' unique 'yes'
|
||||
```
|
||||
|
||||
### Prefixed search
|
||||
|
||||
To enable prefixed search matches, add the following line to
|
||||
_`${ZDOTDIR:-$HOME}/.zpreztorc`_:
|
||||
|
||||
```sh
|
||||
zstyle ':prezto:module:history-substring-search' prefixed 'yes'
|
||||
```
|
||||
|
||||
## Authors
|
||||
|
@ -34,10 +34,6 @@ if zstyle -t ':prezto:module:history-substring-search' case-sensitive; then
|
||||
HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS="${HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS//i}"
|
||||
fi
|
||||
|
||||
if zstyle -t ':prezto:module:history-substring-search' prefixed; then
|
||||
HISTORY_SUBSTRING_SEARCH_PREFIXED='true'
|
||||
fi
|
||||
|
||||
if ! zstyle -t ':prezto:module:history-substring-search' color; then
|
||||
unset HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_{FOUND,NOT_FOUND}
|
||||
fi
|
||||
@ -46,10 +42,14 @@ if zstyle -t ':prezto:module:history-substring-search' fuzzy; then
|
||||
HISTORY_SUBSTRING_SEARCH_FUZZY=1
|
||||
fi
|
||||
|
||||
if zstyle -t ':prezto:module:history-substring-search' ensure-unique; then
|
||||
if zstyle -t ':prezto:module:history-substring-search' unique; then
|
||||
HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE=1
|
||||
fi
|
||||
|
||||
if zstyle -t ':prezto:module:history-substring-search' prefixed; then
|
||||
HISTORY_SUBSTRING_SEARCH_PREFIXED=1
|
||||
fi
|
||||
|
||||
#
|
||||
# Key Bindings
|
||||
#
|
||||
|
@ -109,13 +109,16 @@ zstyle ':prezto:module:editor' key-bindings 'emacs'
|
||||
# Set the search globbing flags.
|
||||
# zstyle ':prezto:module:history-substring-search' globbing-flags ''
|
||||
|
||||
# Enable fuzzy search
|
||||
# Enable search case-sensitivity.
|
||||
# zstyle ':prezto:module:history-substring-search' case-sensitive 'yes'
|
||||
|
||||
# Enable search for fuzzy matches.
|
||||
# zstyle ':prezto:module:history-substring-search' fuzzy 'yes'
|
||||
|
||||
# Retrieve only unique results (removes duplicates)
|
||||
# zstyle ':prezto:module:history-substring-search' ensure-unique 'yes'
|
||||
# Enable search uniqueness.
|
||||
# zstyle ':prezto:module:history-substring-search' unique 'yes'
|
||||
|
||||
# Set the search prefixed.
|
||||
# Enable prefixed search.
|
||||
# zstyle ':prezto:module:history-substring-search' prefixed 'yes'
|
||||
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user