Description
When alt_screen mode is enabled (alt_screen: true in config.json), running shell commands via the ! prefix (e.g., !git log) produces output that is too long and difficult to scroll through.
Steps to Reproduce
- Enable alt_screen mode: set
alt_screen: true in ~/.copilot/config.json
- Launch
copilot
- Run
!git log (or any command that produces output longer than one screen)
- Try to scroll up to see earlier output
Expected Behavior
The output from !git log should be scrollable, either by:
- Piping long output through a pager (like
less) automatically
- Temporarily switching back to the normal screen buffer for
! command output
- Providing some other mechanism to review the full output
Actual Behavior
The output renders in the alternate screen buffer. Once it exceeds the visible terminal height, earlier lines are gone and cannot be scrolled to. This makes commands like git log, git diff, cat on long files, etc. effectively unusable via the ! prefix.
Possible Solutions
- Automatically pipe
! command output through a pager when in alt_screen mode
- Temporarily exit alt_screen for the duration of
! commands, then re-enter
- Capture output and render it in a scrollable view within the CLI
Environment
- OS: Windows 11
- Copilot CLI version: 0.0.419
- Terminal: Windows Terminal / PowerShell
- Config:
alt_screen: true
Workaround
Use --no-pager with git commands (e.g., !git --no-pager log) or pipe to head/tail, but this is not discoverable and defeats the purpose of interactive commands.
Description
When alt_screen mode is enabled (
alt_screen: truein config.json), running shell commands via the!prefix (e.g.,!git log) produces output that is too long and difficult to scroll through.Steps to Reproduce
alt_screen: truein~/.copilot/config.jsoncopilot!git log(or any command that produces output longer than one screen)Expected Behavior
The output from
!git logshould be scrollable, either by:less) automatically!command outputActual Behavior
The output renders in the alternate screen buffer. Once it exceeds the visible terminal height, earlier lines are gone and cannot be scrolled to. This makes commands like
git log,git diff,caton long files, etc. effectively unusable via the!prefix.Possible Solutions
!command output through a pager when in alt_screen mode!commands, then re-enterEnvironment
alt_screen: trueWorkaround
Use
--no-pagerwith git commands (e.g.,!git --no-pager log) or pipe tohead/tail, but this is not discoverable and defeats the purpose of interactive commands.