Skip to content

fix: use terminal yellow instead of hardcoded orange in shell exec output#1512

Open
octo-patch wants to merge 1 commit into
sigoden:mainfrom
octo-patch:fix/issue-1475-remove-hardcoded-shell-exec-color
Open

fix: use terminal yellow instead of hardcoded orange in shell exec output#1512
octo-patch wants to merge 1 commit into
sigoden:mainfrom
octo-patch:fix/issue-1475-remove-hardcoded-shell-exec-color

Conversation

@octo-patch

Copy link
Copy Markdown

Fixes #1475

Problem

The shell exec command display uses a hardcoded RGB orange color (255, 165, 0) which conflicts with many terminal color themes and ignores the user's color preferences.

Solution

Replace the hardcoded color_text(eval_str.trim(), nu_ansi_term::Color::Rgb(255, 165, 0)) with the existing warning_text() helper, which uses the terminal's native Yellow color. This:

  • Respects the user's terminal color theme
  • Honors the NO_COLOR environment variable (already handled by color_text/warning_text)
  • Is consistent with how other warning-style output is colored in the codebase

Testing

Built and verified the code compiles cleanly. The shell exec (aichat -e) command display now uses the terminal's yellow color instead of the hardcoded orange.

…tput (fixes sigoden#1475)

Replace the hardcoded RGB orange color (255, 165, 0) with the existing
warning_text() helper which uses the terminal's native Yellow color.
This integrates with the user's color theme and respects NO_COLOR.

Co-Authored-By: Octopus <liyuan851277048@icloud.com>
ei-grad added a commit to ei-grad/aichat that referenced this pull request Jul 11, 2026
Add an explicit --files list grammar for shell-expanded inputs while
preserving the established single and repeated -f behavior. This avoids
classifying positional prompt tokens by filesystem existence and makes the
file/prompt boundary explicit.

Apply command preludes before --info with defined REPL fallback semantics,
parse editor commands into an executable plus arguments without invoking a
shell, and reuse that parser for REPL buffer editing. Move local image reads
to Tokio, use the configured warning color for generated shell commands, and
document installation and local-agent layouts.

Adapt the bounded fixes discussed in:
sigoden#1451
sigoden#1509
sigoden#1534
sigoden#1533
sigoden#1512
sigoden#1525
sigoden#1383
sigoden#1437
sigoden#1486

Co-Authored-By: Codex CLI <noreply@openai.com>
ei-grad added a commit to ei-grad/aichat that referenced this pull request Jul 11, 2026
Integrate the exact upstream PR head and preserve its original author and
co-author attribution. Generated shell commands now use the configured warning
style instead of a hard-coded RGB orange.

Source: sigoden#1512
Head: 706d052
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.

Remove hard coded color in shell exec

1 participant