gh-copilot
gh-copilot copied to clipboard
[BUG]:
What happened?
I ran the following and got this flow of events:
(venv) bbizar@automationvm-59:~$ gh copilot suggest -s "List all the files in folder"
Welcome to GitHub Copilot in the CLI!
version 1.1.1 (2025-06-17)
I'm powered by AI, so surprises and mistakes are possible. Make sure to verify any generated code or suggestions, and share feedback so that we can learn and improve. For more information, see https://gh.io/gh-copilot-transparency
? What kind of command can I help you with?
> gh command
? What would you like the gh command to do?
> List all the files in folder
Suggestion:
ls -l <folder>
? Select an option
> Execute command
? Are you sure you want to execute the suggested command?
> Yes
It shouldn't have asked 'What would you like the gh command to do" it should have taken the value in " ". More over it finds the right command but doesn't execute it at the end.
Versions
What versions of the relevant software are you running?
(venv) bbizar@automationvm-59:~$ gh version
gh version 2.45.0 (2025-07-18 Ubuntu 2.45.0-1ubuntu0.3)
https://github.com/cli/cli/releases/tag/v2.45.0
(venv) bbizar@automationvm-59:~$ gh copilot version
gh-copilot version 1.1.1 (2025-06-17)
(venv) bbizar@automationvm-59:~$
Relevant terminal output
Hi @bidhovbizar 👋
The problem is that you are using -s, which is actually for:
-s, --shell-out string Path to file for outputting command to execute
If you remove -s and run:
gh copilot suggest "List all the files in folder"
Then it should work as desired.
✗ Error: failed to execute command: failed to copy to clipboard: exit status 1
@BagToad
@BagToad Hi, Do you have any other suggestions I can try here?