Closed tmpm697 closed 3 months ago
man fzf
fzf --version
0.53.0
take below example:
export test=true fd --type file | fzf --bind 'ctrl-t:transform:[[ $test ]] && echo "execute(echo hehe >./hehe; export test=false)+transform-query(echo $test)" || echo "execute(echo kaka >./hehe; export test=true)+transform-query(echo $test)"'
press ctrl-t will always change query to true, but expect true or false between each press.
true
here the whole text after --bind and in single quote evaluate only one time so $test always true and somehow export test=false didn't work
--bind
$test
export test=false
expect something we can dynamically update query with fzf each time press keys, not just one.
See #2976 #2299
Also related: https://github.com/junegunn/fzf/pull/3593/files
Checklist
man fzf
)Output of
fzf --version
0.53.0
OS
Shell
Problem / Steps to reproduce
take below example:
press ctrl-t will always change query to
true
, but expect true or false between each press.here the whole text after
--bind
and in single quote evaluate only one time so$test
alwaystrue
and somehowexport test=false
didn't workexpect something we can dynamically update query with fzf each time press keys, not just one.