mirror of
https://github.com/zsh-users/zsh-history-substring-search.git
synced 2026-11-11 11:41:49 -05:00
follow the oh-my-zsh coding style guidelines
https://github.com/robbyrussell/oh-my-zsh/wiki/Coding-style-guide
This commit is contained in:
@@ -140,7 +140,7 @@ HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS='i'
|
|||||||
# the main ZLE widgets
|
# the main ZLE widgets
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
|
|
||||||
history-substring-search-up() {
|
function history-substring-search-up() {
|
||||||
_history-substring-search-begin
|
_history-substring-search-begin
|
||||||
|
|
||||||
_history-substring-search-up-history ||
|
_history-substring-search-up-history ||
|
||||||
@@ -150,7 +150,7 @@ history-substring-search-up() {
|
|||||||
_history-substring-search-end
|
_history-substring-search-end
|
||||||
}
|
}
|
||||||
|
|
||||||
history-substring-search-down() {
|
function history-substring-search-down() {
|
||||||
_history-substring-search-begin
|
_history-substring-search-begin
|
||||||
|
|
||||||
_history-substring-search-down-history ||
|
_history-substring-search-down-history ||
|
||||||
@@ -278,7 +278,7 @@ if [[ $+functions[_zsh_highlight] -eq 0 ]]; then
|
|||||||
#-------------->8------------------->8------------------->8-----------------
|
#-------------->8------------------->8------------------->8-----------------
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_history-substring-search-begin() {
|
function _history-substring-search-begin() {
|
||||||
_history_substring_search_move_cursor_eol=false
|
_history_substring_search_move_cursor_eol=false
|
||||||
_history_substring_search_query_highlight=
|
_history_substring_search_query_highlight=
|
||||||
|
|
||||||
@@ -326,7 +326,7 @@ _history-substring-search-begin() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
_history-substring-search-end() {
|
function _history-substring-search-end() {
|
||||||
_history_substring_search_result=$BUFFER
|
_history_substring_search_result=$BUFFER
|
||||||
|
|
||||||
# move the cursor to the end of the command line
|
# move the cursor to the end of the command line
|
||||||
@@ -358,7 +358,7 @@ _history-substring-search-end() {
|
|||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
_history-substring-search-up-buffer() {
|
function _history-substring-search-up-buffer() {
|
||||||
#
|
#
|
||||||
# Check if the UP arrow was pressed to move the cursor within a multi-line
|
# Check if the UP arrow was pressed to move the cursor within a multi-line
|
||||||
# buffer. This amounts to three tests:
|
# buffer. This amounts to three tests:
|
||||||
@@ -387,7 +387,7 @@ _history-substring-search-up-buffer() {
|
|||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
_history-substring-search-down-buffer() {
|
function _history-substring-search-down-buffer() {
|
||||||
#
|
#
|
||||||
# Check if the DOWN arrow was pressed to move the cursor within a multi-line
|
# Check if the DOWN arrow was pressed to move the cursor within a multi-line
|
||||||
# buffer. This amounts to three tests:
|
# buffer. This amounts to three tests:
|
||||||
@@ -416,7 +416,7 @@ _history-substring-search-down-buffer() {
|
|||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
_history-substring-search-up-history() {
|
function _history-substring-search-up-history() {
|
||||||
#
|
#
|
||||||
# Behave like up in ZSH, except clear the $BUFFER
|
# Behave like up in ZSH, except clear the $BUFFER
|
||||||
# when beginning of history is reached like in Fish.
|
# when beginning of history is reached like in Fish.
|
||||||
@@ -438,7 +438,7 @@ _history-substring-search-up-history() {
|
|||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
_history-substring-search-down-history() {
|
function _history-substring-search-down-history() {
|
||||||
#
|
#
|
||||||
# Behave like down-history in ZSH, except clear the
|
# Behave like down-history in ZSH, except clear the
|
||||||
# $BUFFER when end of history is reached like in Fish.
|
# $BUFFER when end of history is reached like in Fish.
|
||||||
@@ -461,7 +461,7 @@ _history-substring-search-down-history() {
|
|||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
_history-substring-search-up-search() {
|
function _history-substring-search-up-search() {
|
||||||
_history_substring_search_move_cursor_eol=true
|
_history_substring_search_move_cursor_eol=true
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -534,7 +534,7 @@ _history-substring-search-up-search() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
_history-substring-search-down-search() {
|
function _history-substring-search-down-search() {
|
||||||
_history_substring_search_move_cursor_eol=true
|
_history_substring_search_move_cursor_eol=true
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user