Wiki - https://fedoraproject.org/wiki/Changes/BashColorPrompt_1.0
Discussion  thread -
https://discussion.fedoraproject.org/t/f45-change-proposal-bash-color-prompt-1-0-system-wide/195279

This is a proposed Change for Fedora Linux.
This document represents a proposed Change. As part of the Changes
process, proposals are publicly announced in order to receive
community feedback. This proposal will only be implemented if approved
by the Fedora Engineering Steering Committee.



== Summary ==
`bash-color-prompt` (BCP) version 1.0 is a rewrite of the
[[Changes/Color_Bash_Prompt]] (introduced in Fedora 39) with a new
cleaner simple design, which leans on bash `PROMPT_COMMAND` for
updating dynamic prompts. The default system prompt (still green) is
much simpler now and there is only one predefined function, which
enables optional customization.

== Owner ==
* Name: [[User:Petersen|Jens Petersen]]
* Email: <[email protected]>

== 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 much easier for users to create their own highly customizable bash
prompts just by sequencing various helper functions.

Users can enable customization by add `bcp_setup` to their
`~/.bashrc`, which sets up `PROMPT_COMMAND` for dynamic prompts by
appending the `_bcp_build_prompt` function. Users can then define
`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.

== 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`
(instead of `shell-color-prompt`) - less confusing for users
*** submit a package review.
** Build new version
** Document how to configure
** Fix issues from feedback and improve the experience.

* Other developers: N/A

* Release engineering:
[https://forge.fedoraproject.org/releng/tickets/issues #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_COLOR` and `PROMPT_DIR_COLOR` for
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 color prompt.


== 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:

* [https://github.com/juhp/bash-color-prompt/blob/main/example.bashrc.sh
an example custom config]
* https://github.com/juhp/bash-color-prompt


== 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
flexed out by the code completion.

== Release Notes ==

-- 
Aoife Moloney

Fedora Operations Architect

Fedora Project

Matrix: @amoloney:fedora.im

IRC: amoloney

-- 
_______________________________________________
devel-announce mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://forge.fedoraproject.org/infra/tickets/issues/new
-- 
_______________________________________________
devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://forge.fedoraproject.org/infra/tickets/issues/new

Reply via email to