Bash Color Prompt 1.0
Summary
bash-color-prompt (bcp) version 1.0 is a rewrite of Changes/Color_Bash_Prompt (introduced in Fedora 39) with a new cleaner simple design, which uses bash PROMPT_COMMAND to update dynamic customized prompts. The default system prompt (still green and static) is much simpler now and there is only one predefined function, which enables optional customization.
Owner
- Name: Jens Petersen
- Email: <petersen@redhat.com>
Current status
- Targeted release: Fedora Linux 45
- Last updated: 2026-08-11
- Announced
- Discussion thread
- FESCo issue: #3639
- Tracker bug: #2503680
- Release notes tracker: #403
Detailed Description
This is a major update of the current bash-color-prompt package with a cleaner more declarative "builder pattern"-style approach, which makes it rather easier for users to create their own highly customizable bash prompts just by sequencing various shell helper output functions that write to a "buffer" variable creating the final prompt string.
Users can enable customization by adding bcp_setup to their ~/.bashrc (or say ~/.bashrc.d/bcp-cfg.sh) file, which adds the _bcp_build_prompt function to PROMPT_COMMAND for dynamic PS1 prompt generation. Users can then define their own bcp_layout() to create a custom prompt if they so wish, with features like: timestamps, git branch, last command duration/exitcode, shell level, container prefix, etc, in any way they please using bash statements.
Feedback
Benefit to Fedora
Shell prompts are an important part of a terminal shell and this change will improve Fedora's Bash prompt user experience.
Scope
- Proposal owners:
- (optional) Rename the source package to
bash-color-prompt(fromshell-color-prompt) - less confusing for users- submit a package review (review bug)
- move upstream repo to https://github.com/bash-color-prompt/ org
- Build new version
- Document how to configure
- Fix any issues reported from feedback to improve the general experience.
- (optional) Rename the source package to
- Other developers: N/A
- Release engineering: #Releng issue number
- Policies and guidelines: N/A (not needed for this Change)
- Trademark approval: N/A (not needed for this Change)
- Alignment with the Fedora Strategy:
Upgrade/compatibility impact
- Users who just use the default bash-color-prompt system configuration should not notice any difference nor not need to change anything.
- Simple user configs using
PROMPT_COLORandPROMPT_DIR_COLORfor changing the default color prompt will continue to work, but more complex custom bash-color-prompt's will need to be reworked. - The new version makes creating custom prompts considerable easier, more flexible, and easily extensible.
- There is no change to the default system color prompt format/style.
bash-color-promptshould not run an external process with its default system configuration.
How To Test
Alpha version can be tested today from this copr repo:
<https://copr.fedorainfracloud.org/coprs/petersen/bash-color-prompt/>
(which I have been running locally since January.)
More detailed instructions will come here.
See also:
User Experience
Users who are happy with the default (green) prompt do not need to do anything. The opting out or disabling experience is unchanged.
Users will be able to create arbitrary custom bash prompts much more easily than with the more rigid older bash-color-prompt.
Dependencies
N/A
Contingency Plan
- Contingency mechanism:
- owner to revert bash-color-prompt to the current old version from F44
- Contingency deadline: Beta freeze
- Blocks release? No
Documentation
The main documentation will be the README, which will be further fleshed out by the code completion.
