mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-18 08:13:40 -05:00
Always execute preview command if {q} is in the template
Even when {q} is empty. Because, why not?
While this can be seen as a breaking change, there is an easy workaround
to keep the old behavior.
# This will show // even when the query is empty
: | fzf --preview 'echo /{q}/'
# But if you don't want it,
: | fzf --preview '[ -n {q} ] || exit; echo /{q}/'
Close #2759
This commit is contained in:
@@ -536,7 +536,8 @@ e.g.
|
||||
Note that you can escape a placeholder pattern by prepending a backslash.
|
||||
|
||||
Preview window will be updated even when there is no match for the current
|
||||
query if any of the placeholder expressions evaluates to a non-empty string.
|
||||
query if any of the placeholder expressions evaluates to a non-empty string
|
||||
or \fB{q}\fR is in the command template.
|
||||
|
||||
Since 0.24.0, fzf can render partial preview content before the preview command
|
||||
completes. ANSI escape sequence for clearing the display (\fBCSI 2 J\fR) is
|
||||
|
||||
Reference in New Issue
Block a user