743be91b207d4617e68b04a43311438652cec63d
- Author
- Xin Li <delphij@FreeBSD.org>
- Committer
- Xin Li <delphij@FreeBSD.org>
- Date
Message
Don't leak extendedglob to global environment.
Diff
1diff --git a/plugins/history-substring-search/history-substring-search.zsh b/plugins/history-substring-search/history-substring-search.zsh
2index 22f03dd6d8bffecdc947ddb1262a55497d557171..65f0750db5aca13767e20e12f1ead3e5a19c182e 100644
3--- a/plugins/history-substring-search/history-substring-search.zsh
4+++ b/plugins/history-substring-search/history-substring-search.zsh
5@@ -175,7 +175,6 @@ fi
6 # implementation details
7 #-----------------------------------------------------------------------------
8
9-setopt extendedglob
10 zmodload -F zsh/parameter
11
12 #
13@@ -284,6 +283,7 @@ if [[ $+functions[_zsh_highlight] -eq 0 ]]; then
14 fi
15
16 function _history-substring-search-begin() {
17+ setopt localoptions extendedglob
18 _history_substring_search_move_cursor_eol=false
19 _history_substring_search_query_highlight=
20
21@@ -350,6 +350,7 @@ function _history-substring-search-begin() {
22 }
23
24 function _history-substring-search-end() {
25+ setopt localoptions extendedglob
26 _history_substring_search_result=$BUFFER
27
28 # move the cursor to the end of the command line