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

can fd read paths from stdin? #1346

Open
ghost opened this issue Jul 12, 2023 · 3 comments
Open

can fd read paths from stdin? #1346

ghost opened this issue Jul 12, 2023 · 3 comments
Labels

Comments

@ghost
Copy link

ghost commented Jul 12, 2023

I'm piping from other programs to fd, I'm unsure if fd can read the input; e.g.

fzf --multi --sync < file.txt | xargs -d '\n' fd --extension ogg --absolute-path -

fzf --multi allows interactively selecting several lines (i.e. paths) from file.txt. fd just searches the home directory.

What version of fd are you using?
fd 8.7.0

@ghost ghost added the question label Jul 12, 2023
@tmccombs
Copy link
Collaborator

For that use case what is the advantage of fd over grep or rg?

@ghost
Copy link
Author

ghost commented Jul 14, 2023

For that use case what is the advantage of fd over grep or rg?

@tmccombs In the example I'm redirecting > to a playlist (.m3u, .m3u8) file with absolute paths.

I've added the --absolute-path flag to the first post.

@tmccombs
Copy link
Collaborator

tmccombs commented May 5, 2024

fzf --multi --sync < file.txt | xargs -d '\n'  realpath | grep '\.ogg$'

?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant