From d80e4aa86c83290e91172745cb046846df5d274b Mon Sep 17 00:00:00 2001 From: Indrajit Raychaudhuri Date: Mon, 11 Sep 2023 21:28:26 -0500 Subject: [PATCH 1/8] prompt: Update pure submodule to 1.22.0 --- modules/prompt/external/pure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/prompt/external/pure b/modules/prompt/external/pure index 2f13dea..87e6f5d 160000 --- a/modules/prompt/external/pure +++ b/modules/prompt/external/pure @@ -1 +1 @@ -Subproject commit 2f13dea466466dde1ba844ba5211e7556f4ae2db +Subproject commit 87e6f5dd4c793f6d980532205aaefe196780606f From 5ac0777191b3c72a8af4f5af1631365a9ad81e9a Mon Sep 17 00:00:00 2001 From: Indrajit Raychaudhuri Date: Mon, 11 Sep 2023 21:30:42 -0500 Subject: [PATCH 2/8] history-substring-search: Update history-substring-search submodule to 1.1.0 --- modules/history-substring-search/external | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/history-substring-search/external b/modules/history-substring-search/external index 0f80b8e..400e58a 160000 --- a/modules/history-substring-search/external +++ b/modules/history-substring-search/external @@ -1 +1 @@ -Subproject commit 0f80b8eb3368b46e5e573c1d91ae69eb095db3fb +Subproject commit 400e58a87f72ecec14f783fbd29bc6be4ff1641c From 64d46c407a57ead7e2c0e442b9e1815c6d54d9b5 Mon Sep 17 00:00:00 2001 From: Indrajit Raychaudhuri Date: Mon, 11 Sep 2023 21:34:28 -0500 Subject: [PATCH 3/8] completion: Update completion submodule to 0.35.0 --- modules/completion/external | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/completion/external b/modules/completion/external index 0331b29..67921bc 160000 --- a/modules/completion/external +++ b/modules/completion/external @@ -1 +1 @@ -Subproject commit 0331b2908f93556453e45fa5a899aa21e0a7f64d +Subproject commit 67921bc12502c1e7b0f156533fbac2cb51f6943d From 1b0cc0a219875eb16b75221167e9916820a2956a Mon Sep 17 00:00:00 2001 From: Indrajit Raychaudhuri Date: Mon, 11 Sep 2023 21:51:45 -0500 Subject: [PATCH 4/8] utility: Detect lsd and honor its GNU ls compatibility lsd (LSDeluxe) is a modern GNU compatibile alternative to ls. Detect if it is aliased to ls and honor its GNU ls compatibility. --- modules/utility/init.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/utility/init.zsh b/modules/utility/init.zsh index c901591..7e2e14e 100644 --- a/modules/utility/init.zsh +++ b/modules/utility/init.zsh @@ -76,7 +76,7 @@ if zstyle -T ':prezto:module:utility' safe-ops; then fi # ls -if [[ ${(@M)${(f)"$(ls --version 2>&1)"}:#*GNU *} ]]; then +if [[ ${(@M)${(f)"$(ls --version 2>&1)"}:#*(GNU|lsd) *} ]]; then # GNU Core Utilities if zstyle -T ':prezto:module:utility:ls' dirs-first; then From bd180eec72c3ef28de3e794ebf08a05c640b4eda Mon Sep 17 00:00:00 2001 From: dllud Date: Fri, 19 May 2023 16:41:29 +0100 Subject: [PATCH 5/8] history-substring-search: add fuzzy and unique --- modules/history-substring-search/README.md | 18 ++++++++++++++++++ modules/history-substring-search/init.zsh | 8 ++++++++ runcoms/zpreztorc | 6 ++++++ 3 files changed, 32 insertions(+) diff --git a/modules/history-substring-search/README.md b/modules/history-substring-search/README.md index 3a109c5..42919e0 100644 --- a/modules/history-substring-search/README.md +++ b/modules/history-substring-search/README.md @@ -65,6 +65,24 @@ _`${ZDOTDIR:-$HOME}/.zpreztorc`_: zstyle ':prezto:module:history-substring-search' globbing-flags '' ``` +### Fuzzy search + +To enable fuzzy search add the following line to +`${ZDOTDIR:-$HOME}/.zpreztorc`_: + +```sh +zstyle ':prezto:module:history-substring-search' fuzzy 'yes' +``` + +### Unique results + +To retrieve only unique results (remove duplicates) add the following line to +`${ZDOTDIR:-$HOME}/.zpreztorc`_: + +```sh +zstyle ':prezto:module:history-substring-search' ensure-unique 'yes' +``` + ## Authors _The authors of this module should be contacted via the [issue tracker][5]._ diff --git a/modules/history-substring-search/init.zsh b/modules/history-substring-search/init.zsh index 0de7891..d287ae4 100644 --- a/modules/history-substring-search/init.zsh +++ b/modules/history-substring-search/init.zsh @@ -38,6 +38,14 @@ if ! zstyle -t ':prezto:module:history-substring-search' color; then unset HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_{FOUND,NOT_FOUND} fi +if zstyle -t ':prezto:module:history-substring-search' fuzzy; then + HISTORY_SUBSTRING_SEARCH_FUZZY=1 +fi + +if zstyle -t ':prezto:module:history-substring-search' ensure-unique; then + HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE=1 +fi + # # Key Bindings # diff --git a/runcoms/zpreztorc b/runcoms/zpreztorc index ae68a89..2d863c9 100644 --- a/runcoms/zpreztorc +++ b/runcoms/zpreztorc @@ -109,6 +109,12 @@ zstyle ':prezto:module:editor' key-bindings 'emacs' # Set the search globbing flags. # zstyle ':prezto:module:history-substring-search' globbing-flags '' +# Enable fuzzy search +# zstyle ':prezto:module:history-substring-search' fuzzy 'yes' + +# Retrieve only unique results (removes duplicates) +# zstyle ':prezto:module:history-substring-search' ensure-unique 'yes' + # # macOS # From 9bf1ae66bc94d246daf9537f8f1ade6b36619775 Mon Sep 17 00:00:00 2001 From: mritd Date: Sun, 19 Sep 2021 18:59:54 +0800 Subject: [PATCH 6/8] feat(history-substring-search): add `prefixed` setting support zsh-history-substring-search `HISTORY_SUBSTRING_SEARCH_PREFIXED` env Signed-off-by: mritd --- modules/history-substring-search/README.md | 6 ++++++ modules/history-substring-search/init.zsh | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/modules/history-substring-search/README.md b/modules/history-substring-search/README.md index 42919e0..3284110 100644 --- a/modules/history-substring-search/README.md +++ b/modules/history-substring-search/README.md @@ -63,6 +63,12 @@ _`${ZDOTDIR:-$HOME}/.zpreztorc`_: ```sh zstyle ':prezto:module:history-substring-search' globbing-flags '' + +To set the search matched against the start of each history entry, add the following line to +_`${ZDOTDIR:-$HOME}/.zpreztorc`_: + +```sh +zstyle ':prezto:module:history-substring-search' prefixed 'yes' ``` ### Fuzzy search diff --git a/modules/history-substring-search/init.zsh b/modules/history-substring-search/init.zsh index d287ae4..3748325 100644 --- a/modules/history-substring-search/init.zsh +++ b/modules/history-substring-search/init.zsh @@ -34,6 +34,10 @@ if zstyle -t ':prezto:module:history-substring-search' case-sensitive; then HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS="${HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS//i}" fi +if zstyle -t ':prezto:module:history-substring-search' prefixed; then + HISTORY_SUBSTRING_SEARCH_PREFIXED='true' +fi + if ! zstyle -t ':prezto:module:history-substring-search' color; then unset HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_{FOUND,NOT_FOUND} fi From 74a19fb665a41093f6e587ab80f6849a840acb90 Mon Sep 17 00:00:00 2001 From: mritd Date: Mon, 20 Sep 2021 11:14:46 +0800 Subject: [PATCH 7/8] docs(history-substring-search): add `prefixed` setting example comment add `prefixed` setting example comment Signed-off-by: mritd --- runcoms/zpreztorc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/runcoms/zpreztorc b/runcoms/zpreztorc index 2d863c9..2df7c73 100644 --- a/runcoms/zpreztorc +++ b/runcoms/zpreztorc @@ -115,6 +115,9 @@ zstyle ':prezto:module:editor' key-bindings 'emacs' # Retrieve only unique results (removes duplicates) # zstyle ':prezto:module:history-substring-search' ensure-unique 'yes' +# Set the search prefixed. +# zstyle ':prezto:module:history-substring-search' prefixed 'yes' + # # macOS # From 5ac930d96be3a51730f7d9d7330f28d9c9c36e0a Mon Sep 17 00:00:00 2001 From: Indrajit Raychaudhuri Date: Mon, 11 Sep 2023 23:28:38 -0500 Subject: [PATCH 8/8] history-substring-search: Tweak documentation and cleanup --- modules/history-substring-search/README.md | 26 ++++++++++++++++------ modules/history-substring-search/init.zsh | 10 ++++----- runcoms/zpreztorc | 11 +++++---- 3 files changed, 31 insertions(+), 16 deletions(-) diff --git a/modules/history-substring-search/README.md b/modules/history-substring-search/README.md index 3284110..e7c55c5 100644 --- a/modules/history-substring-search/README.md +++ b/modules/history-substring-search/README.md @@ -63,18 +63,21 @@ _`${ZDOTDIR:-$HOME}/.zpreztorc`_: ```sh zstyle ':prezto:module:history-substring-search' globbing-flags '' +``` -To set the search matched against the start of each history entry, add the following line to +### Case sensitive search + +To set the search case-sensitivity, add the following line to _`${ZDOTDIR:-$HOME}/.zpreztorc`_: ```sh -zstyle ':prezto:module:history-substring-search' prefixed 'yes' +zstyle ':prezto:module:history-substring-search' case-sensitive 'yes' ``` ### Fuzzy search -To enable fuzzy search add the following line to -`${ZDOTDIR:-$HOME}/.zpreztorc`_: +To enable search for fuzzy matches, add the following line to +_`${ZDOTDIR:-$HOME}/.zpreztorc`_: ```sh zstyle ':prezto:module:history-substring-search' fuzzy 'yes' @@ -82,11 +85,20 @@ zstyle ':prezto:module:history-substring-search' fuzzy 'yes' ### Unique results -To retrieve only unique results (remove duplicates) add the following line to -`${ZDOTDIR:-$HOME}/.zpreztorc`_: +To enable unique results, add the following line to +_`${ZDOTDIR:-$HOME}/.zpreztorc`_: ```sh -zstyle ':prezto:module:history-substring-search' ensure-unique 'yes' +zstyle ':prezto:module:history-substring-search' unique 'yes' +``` + +### Prefixed search + +To enable prefixed search matches, add the following line to +_`${ZDOTDIR:-$HOME}/.zpreztorc`_: + +```sh +zstyle ':prezto:module:history-substring-search' prefixed 'yes' ``` ## Authors diff --git a/modules/history-substring-search/init.zsh b/modules/history-substring-search/init.zsh index 3748325..54e8b00 100644 --- a/modules/history-substring-search/init.zsh +++ b/modules/history-substring-search/init.zsh @@ -34,10 +34,6 @@ if zstyle -t ':prezto:module:history-substring-search' case-sensitive; then HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS="${HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS//i}" fi -if zstyle -t ':prezto:module:history-substring-search' prefixed; then - HISTORY_SUBSTRING_SEARCH_PREFIXED='true' -fi - if ! zstyle -t ':prezto:module:history-substring-search' color; then unset HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_{FOUND,NOT_FOUND} fi @@ -46,10 +42,14 @@ if zstyle -t ':prezto:module:history-substring-search' fuzzy; then HISTORY_SUBSTRING_SEARCH_FUZZY=1 fi -if zstyle -t ':prezto:module:history-substring-search' ensure-unique; then +if zstyle -t ':prezto:module:history-substring-search' unique; then HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE=1 fi +if zstyle -t ':prezto:module:history-substring-search' prefixed; then + HISTORY_SUBSTRING_SEARCH_PREFIXED=1 +fi + # # Key Bindings # diff --git a/runcoms/zpreztorc b/runcoms/zpreztorc index 2df7c73..b37c431 100644 --- a/runcoms/zpreztorc +++ b/runcoms/zpreztorc @@ -109,13 +109,16 @@ zstyle ':prezto:module:editor' key-bindings 'emacs' # Set the search globbing flags. # zstyle ':prezto:module:history-substring-search' globbing-flags '' -# Enable fuzzy search +# Enable search case-sensitivity. +# zstyle ':prezto:module:history-substring-search' case-sensitive 'yes' + +# Enable search for fuzzy matches. # zstyle ':prezto:module:history-substring-search' fuzzy 'yes' -# Retrieve only unique results (removes duplicates) -# zstyle ':prezto:module:history-substring-search' ensure-unique 'yes' +# Enable search uniqueness. +# zstyle ':prezto:module:history-substring-search' unique 'yes' -# Set the search prefixed. +# Enable prefixed search. # zstyle ':prezto:module:history-substring-search' prefixed 'yes' #