-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
Feature request: Option to run fd in different directory than pwd #475
Comments
Thank you for the feedback. What is the use case for this? Have you considered alternative options?
|
We're most probably not going to implement this in |
I am using fd output to feed skim on large directories. I need this to be as instant as possible. Having base directory in all entries makes fuzzy search a lot less efficient. I am using this in Fish script which does not support subshell and using cd or pushd/popd messes up Fish history which makes back/forward keyboard shortcuts less efficient. I have tried to pipe fd output to sed/sd before feeding skim in order to remove base directory from the list but this gets quite slow. |
Ok, but a simple wrapper script would work, right? Something like
#!/bin/bash
set -e
base_directory="$1"
shift
cd "$base_directory"
fd "$@" which can be used like
|
Yeah, that should work. I hoped to avoid spawning another shell though. |
No, I'm just trying to keep There is one compromise which I would be willing to make because this should actually be really simple to implement: we add a new "long" command-line option (not |
Pull request #509 created. |
closed via #509 |
Released in fd 7.5.0 |
Git like -C option would be handy to run fd as if it was started in specified path rather than the current working directory.
The text was updated successfully, but these errors were encountered: