mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-06 02:51:32 +01:00
These are the changes for being friendly with my path-saving zsh history
This commit is contained in:
parent
c1f8a11962
commit
40b792f513
1 changed files with 7 additions and 3 deletions
|
|
@ -434,6 +434,8 @@ function _history-substring-search-down-buffer() {
|
|||
false
|
||||
}
|
||||
|
||||
HISTORY_PATH_SEPARATOR="///; "
|
||||
|
||||
function _history-substring-search-up-history() {
|
||||
#
|
||||
# Behave like up in ZSH, except clear the $BUFFER
|
||||
|
|
@ -447,7 +449,8 @@ function _history-substring-search-up-history() {
|
|||
|
||||
# going up from somewhere below the top of history
|
||||
else
|
||||
zle up-history
|
||||
((HISTNO--))
|
||||
BUFFER=${history[$HISTNO]#*$HISTORY_PATH_SEPARATOR}
|
||||
fi
|
||||
|
||||
return true
|
||||
|
|
@ -470,7 +473,8 @@ function _history-substring-search-down-history() {
|
|||
|
||||
# going down from somewhere above the bottom of history
|
||||
else
|
||||
zle down-history
|
||||
((HISTNO++))
|
||||
BUFFER=${history[$HISTNO]#*$HISTORY_PATH_SEPARATOR}
|
||||
fi
|
||||
|
||||
return true
|
||||
|
|
@ -517,7 +521,7 @@ function _history-substring-search-up-search() {
|
|||
# to highlight the current buffer.
|
||||
#
|
||||
(( _history_substring_search_match_index-- ))
|
||||
BUFFER=$history[$_history_substring_search_matches[$_history_substring_search_match_index]]
|
||||
BUFFER=${history[$_history_substring_search_matches[$_history_substring_search_match_index]]#*$HISTORY_PATH_SEPARATOR}
|
||||
_history_substring_search_query_highlight=$HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND
|
||||
|
||||
elif [[ $_history_substring_search_match_index -eq 1 ]]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue