rust_cmd_lib icon indicating copy to clipboard operation
rust_cmd_lib copied to clipboard

is there any way to access Cmd or arguments from the result?

Open horacimacias opened this issue 4 years ago • 1 comments

specially when commands fail, it would be good if it was possible to access the Cmd or the arguments from the error result.

For example, when running something arg1 arg2 fails, I see the following in the logs:

Running ["something", "arg1", "arg2"] exited with error; status code: 255

this is ok, but it would be great if we could customize this output or even access the commands and the arguments. For example:

Running "something arg1 arg2" exited with error; status code: 255

so at least users can copy-paste the same command on the shell without having to delete all the extra quotes and array syntax. Same thing applies to Ok results; perhaps I want to show something like Running "something arg1 arg2" succeeded in debug mode for example.

horacimacias avatar Dec 28 '21 16:12 horacimacias

You should define your own error message, and the above proposal will not work if arguments contain spaces.

rust-shell-script avatar Dec 29 '21 05:12 rust-shell-script

fixed after commit 739946ec1673eef1d73b59db74e1828be87e2c2e

rust-shell-script avatar Oct 16 '23 22:10 rust-shell-script