Skip to content

Persist shell mode commands in prompt history#19618

Merged
etraut-openai merged 1 commit into
mainfrom
etraut/shell-mode-history
Apr 27, 2026
Merged

Persist shell mode commands in prompt history#19618
etraut-openai merged 1 commit into
mainfrom
etraut/shell-mode-history

Conversation

@etraut-openai

@etraut-openai etraut-openai commented Apr 26, 2026

Copy link
Copy Markdown
Collaborator

Why

! shell commands are currently surfaced as "Bash mode", which is misleading for users running shells such as PowerShell or zsh. Those commands also bypass the persistent prompt history path, so they cannot be recalled after starting a new session.

Fixes #19613.

What changed

  • Rename the TUI footer label and related test wording from "Bash mode" to "Shell mode".
  • Persist accepted ! shell commands to prompt history with the leading !, so recall restores the composer into shell mode across sessions.
  • Add coverage for immediate and queued shell-command submissions emitting the prompt-history update.

Verification

  • cargo test -p codex-tui bang_shell
  • cargo test -p codex-tui shell_command_uses_shell_accent_style
  • cargo test -p codex-tui footer_mode_snapshots
  • cargo insta pending-snapshots --manifest-path tui/Cargo.toml

Manually verified fix after confirming presence of bug prior to fix.

@fcoury-oai fcoury-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested before and after and codex confirmed no findings.

@etraut-openai etraut-openai merged commit 0e2300c into main Apr 27, 2026
25 checks passed
@etraut-openai etraut-openai deleted the etraut/shell-mode-history branch April 27, 2026 16:54
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bash mode history

2 participants