mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-04-03 04:20:01 +02:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
240e08bacb
390 changed files with 23279 additions and 1968 deletions
|
|
@ -1,7 +0,0 @@
|
|||
To activate this script, load it into an interactive ZSH session:
|
||||
|
||||
% source history-substring-search.zsh
|
||||
|
||||
See the "history-substring-search.zsh" file for more information:
|
||||
|
||||
% sed -n '2,/^$/s/^#//p' history-substring-search.zsh | more
|
||||
7
plugins/history-substring-search/README.markdown
Normal file
7
plugins/history-substring-search/README.markdown
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
To activate this script, please include it the `plugins` variable within `~/.zshrc`
|
||||
|
||||
`plugins=(git history-substring-search)`
|
||||
|
||||
See the "history-substring-search.zsh" file for more information:
|
||||
|
||||
`sed -n '2,/^$/s/^#//p' history-substring-search.zsh | more`
|
||||
|
|
@ -163,14 +163,18 @@ function history-substring-search-down() {
|
|||
zle -N history-substring-search-up
|
||||
zle -N history-substring-search-down
|
||||
|
||||
bindkey '\e[A' history-substring-search-up
|
||||
bindkey '\e[B' history-substring-search-down
|
||||
zmodload zsh/terminfo
|
||||
if [[ -n "$terminfo[kcuu1]" ]]; then
|
||||
bindkey "$terminfo[kcuu1]" history-substring-search-up
|
||||
fi
|
||||
if [[ -n "$terminfo[kcud1]" ]]; then
|
||||
bindkey "$terminfo[kcud1]" history-substring-search-down
|
||||
fi
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# implementation details
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
setopt extendedglob
|
||||
zmodload -F zsh/parameter
|
||||
|
||||
#
|
||||
|
|
@ -279,6 +283,7 @@ if [[ $+functions[_zsh_highlight] -eq 0 ]]; then
|
|||
fi
|
||||
|
||||
function _history-substring-search-begin() {
|
||||
setopt localoptions extendedglob
|
||||
_history_substring_search_move_cursor_eol=false
|
||||
_history_substring_search_query_highlight=
|
||||
|
||||
|
|
@ -345,6 +350,7 @@ function _history-substring-search-begin() {
|
|||
}
|
||||
|
||||
function _history-substring-search-end() {
|
||||
setopt localoptions extendedglob
|
||||
_history_substring_search_result=$BUFFER
|
||||
|
||||
# move the cursor to the end of the command line
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue