-
-
Notifications
You must be signed in to change notification settings - Fork 833
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 new flag for printing the executed command #1042
Comments
Also this issue specifically does not request a fully configurable output format, for the same reason as #1037 (comment). |
Would this make for a good first issue? Having looked at the code and started part of the implementation, it seems doable for me. So fyi, I'd like to work on this. |
Created a draft PR #1068 for this. So for example:
Or alternatively
In the latter case, due to commands being executed in multiple threads, the order will not match the order of execution as it's basically random. |
I think they should be, yes |
Wonderful feature. Can't wait to see this in use. |
Proposal
Updaptes
adding the short flag
-P
is no longer required. Only the long flag--print-exec
may be implemented.Original
I propose to add a new flag
-P, --print-exec
, which by default will be disabled.When enabled, it causes fd to print the full command line just before executing it.
Also, when color output is enabled at the same time, all parts in the command line which originally were placeholders will be highlighted.
This new flag adds a shortcut and formatting as a bonus for the common case of using
--exec
twice to display and execute a command.A similar convenience flag
-l, --list-details
already exists.This feature request is in contrast to #1037, which proposes for only the filename to be printed.
Examples
Existing default behavior does not change:
With
-P
flag enabled:Here, the
./src/###.rs
part would be highlighted.With
-P
flag enabled and multiple placeholders:Here, both
./song.flac
and./song.wav
would be highlighted.The text was updated successfully, but these errors were encountered: