Skip to content

fix(tui): display flattened shell commands#26475

Open
fcoury-oai wants to merge 4 commits into
fcoury/iterm-tab-status-basefrom
fcoury/iterm-tab-status-shell-command
Open

fix(tui): display flattened shell commands#26475
fcoury-oai wants to merge 4 commits into
fcoury/iterm-tab-status-basefrom
fcoury/iterm-tab-status-shell-command

Conversation

@fcoury-oai
Copy link
Copy Markdown
Contributor

@fcoury-oai fcoury-oai commented Jun 4, 2026

Why

Some shell-wrapped commands arrive as flattened argv. Display-only paths then expose /bin/zsh -lc instead of the command the user recognizes, which also makes the later tab-status detail noisy.

What Changed

  • add a display-only helper that joins flattened bash, zsh, and sh wrapper tails
  • use the helper for parsed unknown commands, unified exec history, and command display
  • keep command canonicalization and approval identity matching strict

How to Test

  1. Run a command represented as /bin/zsh -lc touch /tmp/foo with the inner command split across argv.
  2. Confirm exec history displays touch /tmp/foo without the shell wrapper.
  3. Confirm canonical three-element shell wrappers still render unchanged.

Targeted tests:

  • just test -p codex-shell-command
  • just test -p codex-tui flattened_shell_wrapper

Stack

  1. #26474 base OSC 21337 tab status
  2. fix(tui): display flattened shell commands #26475 flattened shell command display (this PR)
  3. #26476 detailed and throttled tab activity

Part of #25879.

@fcoury-oai fcoury-oai force-pushed the fcoury/iterm-tab-status-shell-command branch from ecf6985 to f1ad153 Compare June 5, 2026 15:21
@fcoury-oai fcoury-oai force-pushed the fcoury/iterm-tab-status-base branch from d693179 to f88e203 Compare June 5, 2026 16:26
@fcoury-oai fcoury-oai force-pushed the fcoury/iterm-tab-status-shell-command branch from f1ad153 to 14e20be Compare June 5, 2026 16:26
@fcoury-oai fcoury-oai marked this pull request as ready for review June 5, 2026 16:57
Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 247a483ca4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/tui/src/exec_command.rs Outdated
Comment thread codex-rs/shell-command/src/bash.rs Outdated
@fcoury-oai
Copy link
Copy Markdown
Contributor Author

@codex review

1 similar comment
@fcoury-oai
Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. What shall we delve into next?

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@fcoury-oai fcoury-oai force-pushed the fcoury/iterm-tab-status-shell-command branch from 27d665c to 8da1e5c Compare June 5, 2026 18:15
@fcoury-oai
Copy link
Copy Markdown
Contributor Author

@codex review

Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8da1e5c7b5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/shell-command/src/bash.rs Outdated
Comment thread codex-rs/shell-command/src/bash.rs Outdated
Comment thread codex-rs/shell-command/src/parse_command.rs Outdated
@fcoury-oai
Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Another round soon, please!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant