-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Description
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.59.0 (bbe1721)
OS
- Linux
- macOS
- Windows
- Etc.
Shell
- bash
- zsh
- fish
Problem / Steps to reproduce
Since 0.53.0 fzf will automatically redirect execute actions to /dev/tty,
so that the usual hack
ls | fzf --bind 'space:execute:vim {} < /dev/tty >/dev/tty' > selected
could be simplified, without worrying about any redirection
ls | fzf --bind `space:execute:vim {}' > selected
but the static /dev/tty is not universally understood/not always a working solution.
A more robust approach would be to query the current pty (e.g. with /usr/bin/tty), which would return something like /dev/pts/4
The more general solution, that also works with programs like emacsclient, should probably be equivalent to something like this:
CURRENT_TTY=$(tty)
ls | fzf --bind "space:execute:emacsclient -t -a \"\" -c {} < $CURRENT_TTY > $CURRENT_TTY" > selected
Metadata
Metadata
Assignees
Labels
No labels