toggle preview between selection and file preview #3574
-
Original post was rather wide with 3 questions. Editing the original post:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
One potential solution involves defining two hotkeys to display the preferred preview. For instance, seq 12 | fzf --multi --preview 'echo {+}' --preview-window 'nohidden' \
--bind 'load:select-all' \
--bind 'ctrl-t:change-preview:echo {+}' \
--bind 'ctrl-g:change-preview:cat {+f}' In the most recent seq 12 | fzf --multi --preview 'echo {+}' --preview-window 'nohidden' \
--bind 'load:select-all' \
--prompt 'First Preview > ' \
--bind 'ctrl-t:transform:[[ ! {fzf:prompt} =~ First ]] &&
echo "change-prompt(First Preview > )+change-preview:echo {+}" ||
echo "change-prompt(Second Preview > )+change-preview:echo {}"' Warning
Footnotes |
Beta Was this translation helpful? Give feedback.
-
HMMM. I can see how this works but think I am still stuck with the two Issues above.
|
Beta Was this translation helpful? Give feedback.
As of
fzf
version0.45.0
, the{fzf:preview-label}
is not a valid placeholder.{}
{n}
{q}
/{fzf:query}
{fzf:prompt}
{fzf:action}
+
f
s
The
{fzf:prompt}
was added so that users could use it as a state1, instead of creating an external file. There's also a discussion about changing the{fzf:prompt}
to$FZF_PROMPT
in the next version2. If you prefer not to use the{fzf:prompt}
, you might need to use an external fi…