|
40 | 40 | ############################################################################## |
41 | 41 |
|
42 | 42 | #----------------------------------------------------------------------------- |
43 | | -# declare global variables |
| 43 | +# declare global configuration variables |
| 44 | +#----------------------------------------------------------------------------- |
| 45 | + |
| 46 | +typeset -g HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND='bg=magenta,fg=white,bold' |
| 47 | +typeset -g HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND='bg=red,fg=white,bold' |
| 48 | +typeset -g HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS='i' |
| 49 | +typeset -g HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE='' |
| 50 | +typeset -g HISTORY_SUBSTRING_SEARCH_FUZZY='' |
| 51 | + |
| 52 | +#----------------------------------------------------------------------------- |
| 53 | +# declare internal global variables |
44 | 54 | #----------------------------------------------------------------------------- |
45 | 55 |
|
46 | 56 | typeset -g BUFFER MATCH MBEGIN MEND CURSOR |
47 | | -typeset -g HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND |
48 | | -typeset -g HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND |
49 | | -typeset -g HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS |
50 | | -typeset -g HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE |
51 | 57 | typeset -g _history_substring_search_refresh_display |
52 | 58 | typeset -g _history_substring_search_query_highlight |
53 | 59 | typeset -g _history_substring_search_result |
54 | 60 | typeset -g _history_substring_search_query |
55 | 61 | typeset -g -a _history_substring_search_query_parts |
56 | | -typeset -g -A _history_substring_search_raw_matches |
| 62 | +typeset -g -a _history_substring_search_raw_matches |
57 | 63 | typeset -g -i _history_substring_search_raw_match_index |
58 | | -typeset -g -A _history_substring_search_matches |
59 | | -typeset -g -A _history_substring_search_unique_filter |
| 64 | +typeset -g -a _history_substring_search_matches |
60 | 65 | typeset -g -i _history_substring_search_match_index |
61 | | - |
62 | | -#----------------------------------------------------------------------------- |
63 | | -# configuration variables |
64 | | -#----------------------------------------------------------------------------- |
65 | | - |
66 | | -typeset -g HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND='bg=magenta,fg=white,bold' |
67 | | -typeset -g HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND='bg=red,fg=white,bold' |
68 | | -typeset -g HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS='i' |
69 | | -typeset -g HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE='' |
70 | | -typeset -g HISTORY_SUBSTRING_SEARCH_FUZZY='' |
71 | | -typeset -g _history_substring_search_{refresh_display,query_highlight,result,query,match_index,raw_match_index} |
72 | | -typeset -ga _history_substring_search{,_raw}_matches |
| 66 | +typeset -g -A _history_substring_search_unique_filter |
73 | 67 |
|
74 | 68 | #----------------------------------------------------------------------------- |
75 | 69 | # the main ZLE widgets |
@@ -280,8 +274,7 @@ _history-substring-search-begin() { |
280 | 274 | # |
281 | 275 | _history_substring_search_raw_match_index=0 |
282 | 276 | _history_substring_search_matches=() |
283 | | - unset _history_substring_search_unique_filter |
284 | | - typeset -A -g _history_substring_search_unique_filter |
| 277 | + _history_substring_search_unique_filter=() |
285 | 278 |
|
286 | 279 | # |
287 | 280 | # If $_history_substring_search_match_index is equal to |
|
0 commit comments