Convert to FZF_CTRL_T_OPTS #4434
Answered
by
bitraid
omnigenous
asked this question in
Q&A
-
Works flawlessly: fd --type file |
fzf --prompt 'Files> ' \
--header 'CTRL-T: Switch between Files/Directories' \
--bind 'ctrl-t:transform:[[ ! $FZF_PROMPT =~ Files ]] &&
echo "change-prompt(Files> )+reload(fd --type file)" ||
echo "change-prompt(Directories> )+reload(fd --type directory)"' But I wanted to convert it to zsh config: export FZF_CTRL_T_COMMAND="fd --type file"
export FZF_CTRL_T_OPTS="
--prompt 'Files> '
--header 'CTRL-T: Switch between Files/Directories'
--bind 'ctrl-t:transform:[[ ! $FZF_PROMPT =~ Files ]] &&
echo "change-prompt(Files> )+reload(fd --type file)" ||
echo "change-prompt(Directories> )+reload(fd --type directory)"'"
The problem (I think) is |
Beta Was this translation helpful? Give feedback.
Answered by
bitraid
Jun 25, 2025
Replies: 1 comment 3 replies
-
Try this: export FZF_CTRL_T_OPTS='
--prompt "Files> "
--header "CTRL-T: Switch between Files/Directories"
--bind '\''ctrl-t:transform:[[ ! $FZF_PROMPT =~ Files ]] &&
echo "change-prompt(Files> )+reload(fd --type file)" ||
echo "change-prompt(Directories> )+reload(fd --type directory)"'\' |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
omnigenous
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try this: