Comments (4)
it's quite a breaking change
Yeah, but I'd say it was a misuse of a feature, like the spacebar heating case.
from fzf.
Yes, it is intentional. execute
action is for executing an external program in the alternate screen without leaving fzf, and it isn't supposed to affect the final output of fzf.
Lines 71 to 75 in 6de0a7d
For example, when you run selected=$(ls | fzf --bind 'ctrl-o:execute:vim {}')
, you don't want any output from Vim in the final output of fzf. Also, prior to 0.53.0, you would have to redirect the standard output of Vim to /dev/tty
for it to work properly in this case. Considering the original purpose of execute
, this was confusing and not ergonomic.
Another mistake here is using execute
where you should be using execute-silent
. execute
runs the command in the alternate screen, you'll notice screen flashing.
fzf --bind 'space:execute-silent(ls)+accept' --height 30%
how can I now replicate the prior-0.53.0 behaviour?
1. Use print
action
fzf --bind 'f1:print(f1)+accept' fzf --bind 'f2:print(f2)+abort'
2. Use become
action
fzf --bind 'f1:become:echo f1; echo {}' --bind 'f2:become:echo f2; exit 1'
3. Use --expect
If you just need the key names to be printed, --expect
is the simplest.
fzf --expect f1,f2
from fzf.
So, for the reference, it's
--bind 'f2:print(ccc)+accept'
instead of
--bind='f2:execute(printf ccc)+accept'
to get ccc aaa
from the example above. And (with optional exit 1
if needed)
--bind 'f1:become:echo bbb'
instead of
--bind='f1:execute(printf bbb)+abort'
to get bbb
.
While certainly looking more logical and more consistent, it's quite a breaking change, I'd say...
from fzf.
Forgot to say thanks for the explanation :)
from fzf.
Related Issues (20)
- Help creating custom fuzzy seach command script. HOT 1
- [Feature Request] Handle pytest command the same as python HOT 10
- Requires tmux 3.2 or above not only popup window HOT 1
- Support comments within FZF_DEFAULT_OPTS_FILE content HOT 5
- Matching with word boundaries HOT 7
- fzf version for linux too outdated HOT 1
- "Error: Not support reporting screen sizes in pixels" when previewing images in kitty from tmux with `--tmux` option. HOT 2
- feature request: add support for `-S fg=<color> -s fg=<color>` tmux popup flags in fzf-tmux HOT 2
- Support elvish shell condition in --bind HOT 9
- unknown option: --bash HOT 1
- on windows, using gitbash/mintty, fzf reverse history search (ctrl-r) hangs the terminal indefinitely HOT 4
- The `--txux` flag ignored when set from the config file HOT 4
- Santa blocking execution HOT 1
- vim fzf doesn't work with the latest vim junegunn/fzf HOT 2
- Please add 'command' bindkey in Macos
- Anchor match (specifically the "suffix-exact-match") doesn't seems to be working as expected! HOT 3
- [Feature request] improve performance handling iterm2 image protocol in `--preview`
- Sort by length with --disabled HOT 2
- Placeholder expression for accept/print actions
- Bash history integration on Mac prefixing selected command with reverse index HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fzf.