Skip to content
Myr

docs(ADVANCED.md): replace placeholder with env variable for toggle single key binding (#3593)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by LangLangBart · committed by GitHub · parent 3a4c3d3 · Browse files · 1 file+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−3 removed

  • other:+3 added−3 removed

1 file+3 added−3 removed

modified:ADVANCED.md+3 added-3 removed
220 unmodified lines
2211. a way to store the current state. i.e. "which mode are we in?"2222. and a way to dynamically perform different actions depending on the state.223224The following example shows how to 1. store the current mode in the prompt225string, 2. and use this information (`{fzf:prompt}`) to determine which225string, 2. and use this information (`$FZF_PROMPT`) to determine which226actions to perform using the `transform` action.227228```sh229fd --type file |230 fzf --prompt 'Files> ' \231 --header 'CTRL-T: Switch between Files/Directories' \232 --bind 'ctrl-t:transform:[[ ! {fzf:prompt} =~ Files ]] &&232 --bind 'ctrl-t:transform:[[ ! $FZF_PROMPT =~ Files ]] &&233 echo "change-prompt(Files> )+reload(fd --type file)" ||234 echo "change-prompt(Directories> )+reload(fd --type directory)"' \235 --preview '[[ {fzf:prompt} =~ Files ]] && bat --color=always {} || tree -C {}'235 --preview '[[ $FZF_PROMPT =~ Files ]] && bat --color=always {} || tree -C {}'236```237238Ripgrep integration239-------------------
441 unmodified lines