fd
fd copied to clipboard
"Command not found" error message could be improved
Since fd 8.4, we show this error message:
▶ fd foo -X non-existent
[fd error]: Command not found: Command { inner: "non-existent" "./foo", remaining_argument_length: 2079626 }
which is confusing for the average user.
The reason for that is the usage of argmax::Command instead of std::process::Command. This should probably be fixed by a custom Debug impl for argmax::Command, instead of using #[derive(…)]. This could then delegate to the Debug implementation of the inner std::process::Command, to maintain maximum compatibility, even in debug prints.
An even better option might be to not rely on debug formats at all and implement a proper formatting function.