pet
pet copied to clipboard
supporting a ShowCommand option which does exactly the same as --command
Issue #, if available: not really an issue but more like to make it more flexible in terms of showing command it ran, cause we found it useful, or simply default --command to be ture?
Description of changes: it might be easier to have --command option being a config option too, so people can define it in configuration file instead of each time adding an argument in the end of
pet exec --command
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Right now, the workaround on my side is using piping to| pbcopy
and pasting it so I can have it visible. But I like this, even configurable to make it default.
Hey @cxfcxf! I think this can even be done by default, what do you think?
I don't feel like the default behavior should be to hide the command that was run. Specially given that you have no way of seeing what was run after the fact (since it's not added to history).
@knqyf263 Do you by any chance remember why it is designed to be hidden by default?
Hey @cxfcxf! I think this can even be done by default, what do you think?
I don't feel like the default behavior should be to hide the command that was run. Specially given that you have no way of seeing what was run after the fact (since it's not added to history).
@knqyf263 Do you by any chance remember why it is designed to be hidden by default?
yeah it can be done as default. i was trying to not affect default behavior as much as i can.
I don't remember. We can change it.
Alright cool, let's do it. I think this might play well into a future ticket as well which will allow adding the command to shell history.
@cxfcxf Would you mind updating this PR to always print the following?
> $command
Just a fmt.Printf("> %s\n", command)
that always executes, and removing the --command flag.
Took a few years but we're there 😀 🥳
Alright cool, let's do it. I think this might play well into a future ticket as well which will allow adding the command to shell history.
@cxfcxf Would you mind updating this PR to always print the following?
> $command
Just a
fmt.Printf("> %s\n", command)
that always executes, and removing the --command flag.Took a few years but we're there 😀 🥳
i removed show command, and just it have print command all the time
but i did not remove the command flag, cause it has been so long, i dont know what changes in between. if i go to remove all the command flag part, there will be conflict.
No worries, I'll take it from here, thanks @cxfcxf!