Skip to content

Commit

Permalink
Remove duplicate variable declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
gezalore committed May 16, 2017
1 parent fd27842 commit e60f6e1
Showing 1 changed file with 15 additions and 22 deletions.
37 changes: 15 additions & 22 deletions zsh-history-substring-search.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -40,36 +40,30 @@
##############################################################################

#-----------------------------------------------------------------------------
# declare global variables
# declare configuration variables
#-----------------------------------------------------------------------------

typeset -g HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND='bg=magenta,fg=white,bold'
typeset -g HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND='bg=red,fg=white,bold'
typeset -g HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS='i'
typeset -g HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE=''
typeset -g HISTORY_SUBSTRING_SEARCH_FUZZY=''

#-----------------------------------------------------------------------------
# declare other global variables
#-----------------------------------------------------------------------------

typeset -g BUFFER MATCH MBEGIN MEND CURSOR
typeset -g HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND
typeset -g HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND
typeset -g HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS
typeset -g HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE
typeset -g _history_substring_search_refresh_display
typeset -g _history_substring_search_query_highlight
typeset -g _history_substring_search_result
typeset -g _history_substring_search_query
typeset -g -a _history_substring_search_query_parts
typeset -g -A _history_substring_search_raw_matches
typeset -g -a _history_substring_search_raw_matches
typeset -g -i _history_substring_search_raw_match_index
typeset -g -A _history_substring_search_matches
typeset -g -A _history_substring_search_unique_filter
typeset -g -a _history_substring_search_matches
typeset -g -i _history_substring_search_match_index

#-----------------------------------------------------------------------------
# configuration variables
#-----------------------------------------------------------------------------

typeset -g HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND='bg=magenta,fg=white,bold'
typeset -g HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND='bg=red,fg=white,bold'
typeset -g HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS='i'
typeset -g HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE=''
typeset -g HISTORY_SUBSTRING_SEARCH_FUZZY=''
typeset -g _history_substring_search_{refresh_display,query_highlight,result,query,match_index,raw_match_index}
typeset -ga _history_substring_search{,_raw}_matches
typeset -g -A _history_substring_search_unique_filter

#-----------------------------------------------------------------------------
# the main ZLE widgets
Expand Down Expand Up @@ -280,8 +274,7 @@ _history-substring-search-begin() {
#
_history_substring_search_raw_match_index=0
_history_substring_search_matches=()
unset _history_substring_search_unique_filter
typeset -A -g _history_substring_search_unique_filter
_history_substring_search_unique_filter=()

#
# If $_history_substring_search_match_index is equal to
Expand Down

0 comments on commit e60f6e1

Please sign in to comment.