Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Placeholder expression for accept/print actions #3987

Open
4 of 10 tasks
cskeeters opened this issue Sep 5, 2024 · 0 comments
Open
4 of 10 tasks

Placeholder expression for accept/print actions #3987

cskeeters opened this issue Sep 5, 2024 · 0 comments

Comments

@cskeeters
Copy link
Contributor

Checklist

  • I have read through the manual page (man fzf)
  • I have searched through the existing issues
  • For bug reports, I have checked if the bug is reproducible in the latest version of fzf

Output of fzf --version

0.55.0

OS

  • Linux
  • macOS
  • Windows
  • Etc.

Shell

  • bash
  • zsh
  • fish

Problem / Steps to reproduce

I propose adding placeholder expressions (i.e. {1}) for accept/print actions.

The command:

fzf -d : --with-nth 2.. --bind 'enter:become(echo {1})'

would turn into either:

fzf -d : --with-nth 2.. --bind 'enter:accept({1})'
fzf -d : --with-nth 2.. --bind 'enter:print({1})+abort'

I realize this is a nice to have.

I also think --accept-nth would complement --with-nth and --nth nicely for those users who don't want to mess with bindings and actions or don't understand replacing processes.

fzf -d : --with-nth 2.. --accept-nth 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant