Skip to content

fix: mark non-printable characters in bash prompt#1296

Merged
RoyalOughtness merged 1 commit intosecureblue:livefrom
HastD:bash-prompt-fix
Aug 29, 2025
Merged

fix: mark non-printable characters in bash prompt#1296
RoyalOughtness merged 1 commit intosecureblue:livefrom
HastD:bash-prompt-fix

Conversation

@HastD
Copy link
Copy Markdown
Collaborator

@HastD HastD commented Aug 29, 2025

This ensures bash correctly calculates prompt width, fixing a bug where parts of the prompt could be overwritten when navigating command history. Also switch to a simpler method of modifying the prompt that only uses PS1 instead of PROMPT_COMMAND. The non-printable characters are marked by enclosing them in \[\], as documented here.

This ensures bash correctly calculates prompt width, fixing a bug where
parts of the prompt could be overwritten when navigating command
history. Also switch to a simpler method of modifying the prompt that
only uses `PS1` instead of `PROMPT_COMMAND`.
@HastD HastD requested a review from RoyalOughtness as a code owner August 29, 2025 14:30
@RoyalOughtness RoyalOughtness merged commit 76757b3 into secureblue:live Aug 29, 2025
10 of 11 checks passed
@HastD HastD deleted the bash-prompt-fix branch August 29, 2025 17:35
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.

4 participants