[BUG]: The behavior of `Execute command` contradicts with the documentation.
What happened?
When I execute gh copilot suggest command without --shell-out option and select Execute command, it says:
Without using the
ghcsalias or-s,--shell-outflag, the suggested command will be copied to your clipboard for you to paste and execute.
I think this implies:
If you use the
ghcsalias or if you use-s,--shell-outoption or if you use both of them, your clipboard is not updated and the suggested command is directly executed.
However, the actual behavior is
-
The suggested command is not executed.
-
The clipboard is not updated either.
-
The suggested command is written to the file specified by
-soption.
Versions
gh version 2.46.0 (2024-03-20)
gh-copilot version 1.0.0 (2024-03-18)
@your-diary : thank you for opening this issue and apologies for the confusion! 🙇
Please allow me to say this is all a bit complicated. 😅 Truthfully the -s, --shell-out flag probably shouldn't have been mentioned in the message as we didn't intend users to fiddle with it; the idea was to use the aliases like the technical preview to execute commands.
Ideally, I think we need to go back to the drawing board to see how we might avoid relying upon the aliases for executing commands all together, having them be convenient little helpers only.
So in the mean time, I'd say to solely stick to the ghcs alias as we should remove mention of -s, --shell-out in the short term while figuring out how to natively handle command execution.