From 1605ba3627cf75283da66af571c54d2c51f12e09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martynas=20=C5=BDilinskas?= Date: Fri, 26 Jul 2024 20:36:09 +0300 Subject: [PATCH 1/2] Added $ZSHSELECT_INSTANT_SELECT configurationoption. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martynas Žilinskas --- functions/zsh-select | 2 ++ 1 file changed, 2 insertions(+) diff --git a/functions/zsh-select b/functions/zsh-select index 5dea499..652cc60 100755 --- a/functions/zsh-select +++ b/functions/zsh-select @@ -8,6 +8,7 @@ # - ZSHSELECT_BORDER # - ZSHSELECT_ACTIVE_TEXT # - ZSHSELECT_START_IN_SEARCH_MODE +# - ZSHSELECT_INSTANT_SELECT builtin emulate -RL zsh ${=${options[xtrace]:#off}:+-o xtrace} builtin setopt extended_glob warn_create_global typeset_silent no_short_loops rc_quotes no_auto_pushd @@ -34,6 +35,7 @@ themes=( "white/black/0" "white/black/1" "green/black/0" "green/black/1" "white/ # If 1, pressing enter when in search mode will not only # leave the mode, but also do selection and leave tool local NLIST_INSTANT_SELECT=0 +[[ "$ZSHSELECT_INSTANT_SELECT" = (0|1) ]] && NLIST_INSTANT_SELECT="$ZSHSELECT_INSTANT_SELECT" # How should be current element of the list drawn. Possible values: reverse, underline. # On Linux virtual terminal this will be enforced to reverse (because of poor From e04b33a4e71d7561fe2b1a0b695c5b032bbff2a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martynas=20=C5=BDilinskas?= Date: Fri, 26 Jul 2024 20:37:20 +0300 Subject: [PATCH 2/2] Update README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martynas Žilinskas --- docs/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/README.md b/docs/README.md index a74f718..4838884 100644 --- a/docs/README.md +++ b/docs/README.md @@ -62,6 +62,7 @@ export ZSHSELECT_COLOR_PAIR="white/black" # Draw in white foreground, black ba export ZSHSELECT_BORDER="0" # No border around interface, Use "1" for the border export ZSHSELECT_ACTIVE_TEXT="reverse" # Mark current element with reversed text. Use "underline" for marking with underline export ZSHSELECT_START_IN_SEARCH_MODE="1" # Starts Zsh-Select with searching active. "0" will not invoke searching at start. +export ZSHSELECT_INSTANT_SELECT="1" # If 1, pressing enter when in search mode will not only leave the mode, but also do selection and leave tool. ``` ## Use with plugin managers