Copilot CLI: Prompting, Interactive Use, and Core Workflows/Run a shell command without leaving Copilot

Execute a local shell command directly from the session.

Section: Context-rich prompting inside a session

Run a shell command without leaving Copilot

text
text
! git status
Explanation

Useful for checking repo state while staying inside the interactive workflow.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Context-rich prompting inside a session
Edit the prompt in an external editor
Open the current prompt in your configured editor.
OpenIn sheettextsame section
Clear the screen
Reset visual clutter during long sessions.
OpenIn sheettextsame section
Cancel the current operation
Stop the current task or prompt execution.
OpenIn sheettextsame section
Exit the CLI
Shut down the session from the keyboard.
OpenIn sheettextsame section
Inject a file into the prompt context
Reference a file inline inside the interactive UI.
OpenIn sheettextsame section
Summarize a file from the command line
Run Copilot non-interactively with a prompt.
OpenIn sheetbash1 tag match