summaryrefslogtreecommitdiff
path: root/ADVANCED.md
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2025-01-27 01:46:21 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2025-01-27 01:46:21 +0900
commit80da0776f85612d527e380226734f9372e7a0719 (patch)
tree8e7b4c2dc223e4312148ba39ba903f942a91012e /ADVANCED.md
parente91f10ab167f10328816fab65fc38370059986f3 (diff)
downloadfzf-80da0776f85612d527e380226734f9372e7a0719.tar.gz
Allow actions to multiple keys and events at once
Close #4206
Diffstat (limited to 'ADVANCED.md')
-rw-r--r--ADVANCED.md10
1 files changed, 3 insertions, 7 deletions
diff --git a/ADVANCED.md b/ADVANCED.md
index 69c738a9..a045140c 100644
--- a/ADVANCED.md
+++ b/ADVANCED.md
@@ -515,8 +515,6 @@ remainder of the query is passed to fzf for secondary filtering.
```sh
#!/usr/bin/env bash
-# Switch between Ripgrep mode and fzf filtering mode (CTRL-T)
-RG_PREFIX="rg --column --line-number --no-heading --color=always --smart-case "
INITIAL_QUERY="${*:-}"
TRANSFORMER='
words=($FZF_QUERY)
@@ -530,15 +528,14 @@ TRANSFORMER='
# restart ripgrep and reload the list
elif ! [[ $FZF_QUERY =~ \ $ ]]; then
pat=${words[0]}
- echo "reload:sleep 0.1; $RG_PREFIX \"$pat\" || true"
+ echo "reload:sleep 0.1; rg --column --line-number --no-heading --color=always --smart-case \"$pat\" || true"
else
echo search:
fi
'
fzf --ansi --disabled --query "$INITIAL_QUERY" \
--with-shell 'bash -c' \
- --bind "start:transform:$TRANSFORMER" \
- --bind "change:transform:$TRANSFORMER" \
+ --bind "start,change:transform:$TRANSFORMER" \
--color "hl:-1:underline,hl+:-1:underline:reverse" \
--delimiter : \
--preview 'bat --color=always {1} --highlight-line {2}' \
@@ -575,8 +572,7 @@ pods() {
--info=inline --layout=reverse --header-lines=1 \
--prompt "$(kubectl config current-context | sed 's/-context$//')> " \
--header $'╱ Enter (kubectl exec) ╱ CTRL-O (open log in editor) ╱ CTRL-R (reload) ╱\n\n' \
- --bind 'start:reload:$command' \
- --bind 'ctrl-r:reload:$command' \
+ --bind 'start,ctrl-r:reload:$command' \
--bind 'ctrl-/:change-preview-window(80%,border-bottom|hidden|)' \
--bind 'enter:execute:kubectl exec -it --namespace {1} {2} -- bash' \
--bind 'ctrl-o:execute:${EDITOR:-vim} <(kubectl logs --all-containers --namespace {1} {2})' \