summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLangLangBart <92653266+LangLangBart@users.noreply.github.com>2024-01-22 05:17:03 +0100
committerGitHub <noreply@github.com>2024-01-22 13:17:03 +0900
commit09b0958b5f2b4ab0337f0c5125edba505462d162 (patch)
tree6b7488c96b2157c52502c465449c6f4d3dcef8d1
parent3a4c3d3e58691beec3a6aff34e5b80fde541e13d (diff)
docs(ADVANCED.md): replace placeholder with env variable for toggle single key binding (#3593)
-rw-r--r--ADVANCED.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/ADVANCED.md b/ADVANCED.md
index 6e1d04f1..e001e565 100644
--- a/ADVANCED.md
+++ b/ADVANCED.md
@@ -222,17 +222,17 @@ To make a key binding behave differently each time it is pressed, we need:
2. and a way to dynamically perform different actions depending on the state.
The following example shows how to 1. store the current mode in the prompt
-string, 2. and use this information (`{fzf:prompt}`) to determine which
+string, 2. and use this information (`$FZF_PROMPT`) to determine which
actions to perform using the `transform` action.
```sh
fd --type file |
fzf --prompt 'Files> ' \
--header 'CTRL-T: Switch between Files/Directories' \
- --bind 'ctrl-t:transform:[[ ! {fzf:prompt} =~ Files ]] &&
+ --bind 'ctrl-t:transform:[[ ! $FZF_PROMPT =~ Files ]] &&
echo "change-prompt(Files> )+reload(fd --type file)" ||
echo "change-prompt(Directories> )+reload(fd --type directory)"' \
- --preview '[[ {fzf:prompt} =~ Files ]] && bat --color=always {} || tree -C {}'
+ --preview '[[ $FZF_PROMPT =~ Files ]] && bat --color=always {} || tree -C {}'
```
Ripgrep integration