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
Add ---exec-shell option #1406
Labels
Comments
e.g. a self-defined function like that: function trash
gio trash $argv
end fd --type file --type empty --exec trash ✘ 1
[fd error]: Command not found: trash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As mentioned in #1354 (comment)
There are many cases where it is desirable to use
--exec
or --exec-batch` with a shell command, including having access to aliases and shell functions, being able to use pipes and redirection, etc.Having an option that automatically handles the boilerplate of
$SHELL -c
for you would make those use cases a lot more convenient.Before jumping in and implementing this though, there are some open questions I would like answered:
sh
, try to use bash with a fallback tosh
, or maybe try to use SHELL but fall back tosh
? On Windows, do we use powershell or cmd.exe? And if the former, what do we do if it isn't available? what about cygwin?-c
? I don't know of any that don't, but do we need to worry about SHELL being set to something weird that doesn't?The text was updated successfully, but these errors were encountered: