mirror of
https://github.com/dcarrillo/prezto.git
synced 2025-06-15 04:41:43 +00:00
[#23] Rename plugins to modules
This commit is contained in:
36
modules/history-substring-search/README.md
Normal file
36
modules/history-substring-search/README.md
Normal file
@ -0,0 +1,36 @@
|
||||
history-substring-search
|
||||
========================
|
||||
|
||||
It implements the [Fish shell][1]'s history search feature, where the user can
|
||||
type in any part of a previously entered command and press the `UP` and `DOWN`
|
||||
arrow keys to cycle through matching commands.
|
||||
|
||||
Settings
|
||||
--------
|
||||
|
||||
### Case Sensitivity
|
||||
|
||||
To enable case-sensitivity for this module only, add the following line to
|
||||
*zshrc*:
|
||||
|
||||
zstyle ':omz:module:history-substring-search' case-sensitive 'yes'
|
||||
|
||||
### Highlighting
|
||||
|
||||
If colors are enabled, _history-substring-search_ will automatically highlight
|
||||
positive results.
|
||||
|
||||
To enable highlighting for this module only, and the following line to *zshrc*:
|
||||
|
||||
zstyle -t ':omz:module:history-substring-search' color 'yes'
|
||||
|
||||
Authors
|
||||
-------
|
||||
|
||||
*The authors of this module should be contacted via the GitHub issue tracker.*
|
||||
|
||||
- [Sorin Ionescu](/sorin-ionescu)
|
||||
- [Suraj N. Kurapati](/sunaku)
|
||||
|
||||
[1]: http://fishshell.com
|
||||
|
1
modules/history-substring-search/external
Submodule
1
modules/history-substring-search/external
Submodule
Submodule modules/history-substring-search/external added at 04c2eca00c
24
modules/history-substring-search/init.zsh
Normal file
24
modules/history-substring-search/init.zsh
Normal file
@ -0,0 +1,24 @@
|
||||
#
|
||||
# Integrates history-substring-search into Oh My Zsh.
|
||||
#
|
||||
# Authors:
|
||||
# Suraj N. Kurapati <sunaku@gmail.com>
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
source "${0:h}/external/zsh-history-substring-search.zsh"
|
||||
|
||||
if zstyle -t ':omz:module:history-substring-search' case-sensitive; then
|
||||
unset HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS
|
||||
fi
|
||||
|
||||
if ! zstyle -t ':omz:module:history-substring-search' color; then
|
||||
unset HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND
|
||||
unset HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND
|
||||
fi
|
||||
|
||||
bindkey -M emacs "$keyinfo[Control]P" history-substring-search-up
|
||||
bindkey -M emacs "$keyinfo[Control]N" history-substring-search-down
|
||||
bindkey -M vicmd "k" history-substring-search-up
|
||||
bindkey -M vicmd "j" history-substring-search-down
|
||||
|
Reference in New Issue
Block a user