Skip to content

added custom PS2, PS3, and PS4 prompts#1

Open
TheOddCell wants to merge 1 commit into
NULL-GNU-Linux:mainfrom
TheOddCell:patch-1
Open

added custom PS2, PS3, and PS4 prompts#1
TheOddCell wants to merge 1 commit into
NULL-GNU-Linux:mainfrom
TheOddCell:patch-1

Conversation

@TheOddCell
Copy link
Copy Markdown

image

Added custom prompts for PS2, PS3, and PS4 in bashrc.
@oddsclaude
Copy link
Copy Markdown

PR Review: NULL-GNU-Linux/extras #1

"added custom PS2, PS3, and PS4 prompts"

Author: @TheOddCell | Verdict: ✅ Approve with a nit


Summary

Adds styled prompts for bash's three secondary prompt variables (PS2, PS3, PS4)
to complement the existing PS1. Clean, minimal, purposeful change.


Correctness

Guard conditions — all correct

  • [ "$PS2" = '> ' ] — matches bash's default PS2, won't override a user-set value ✓
  • [ -z "$PS3" ] — correct; PS3 has no persistent default in the environment
    (bash only sets it internally during select loops, not as an env variable) ✓
  • [ "$PS4" = '+ ' ] — matches bash's default PS4 ✓

Escape sequence style — correct per variable

  • PS2 uses \[\e[...\] readline-style markers — correct, PS2 goes through readline ✓
  • PS3 uses $'\e[...' raw ANSI — correct, PS3 is printed by fprintf in select,
    not readline ✓
  • PS4 uses \[\e[...\] readline-style markers — verified working; bash's
    decode_prompt_string() strips \[...\] markers for all PS variables ✓

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.

2 participants