Bug 149473
| Summary: | Revert to former $PS1 style | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 4 | Reporter: | Andreas Thienemann <andreas> | ||||
| Component: | setup | Assignee: | Bill Nottingham <notting> | ||||
| Status: | CLOSED WONTFIX | QA Contact: | David Lawrence <dkl> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 4.0 | CC: | rvokal | ||||
| Target Milestone: | --- | Keywords: | FutureFeature | ||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Enhancement | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2005-02-24 19:30:44 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
|
Description
Andreas Thienemann
2005-02-23 14:32:24 UTC
Created attachment 111339 [details]
Patch reverting back to the former bahaviour
This is basically a rollback of the changes from bash-2.05b to bash-3.0, which
result in the "unwanted" transformation of \W
Can you explain in a bit more detail why you think this change is needed? Thanks. Well, it is not needed per se as it is "just" a cosmetic issue. However, the prompt style for Red Hat Products since RHL 3.0.3 (first RHL I installed) has always been "[root@localhost root]# ". Having changed this to "[root@horscht ~]# " by an upstream decision may not be considered important as it is, after all, just an appearance issue. However, I much preferred the former style and thus would like to see it restored, as do others, as can be seen on the Fedora Core list https://www.redhat.com/archives/fedora-list/2004-December/msg02154.html. Alex describes it correctly IMHO: It's irritating. People are used to if for several years. You *could* achieve what you want like this:
export PROMPT_COMMAND="${PROMPT_COMMAND};"'export PWD_W=${PWD##/*/}'
export PS1='[\u@\h $PWD_W]\$ '
but I'll ask upstream for a better solution.
The better solution is:
export PS1='[\u@\h ${PWD##/*/}]\$ '
/etc/bashrc is owned by the setup package. Changing component and reassigning.
I don't think changing the upstream behavior of bash by changing the setup PS1 definition is really worth the effort. I can't follow you.
Changing the setup PS1 defintion to PS1='[\u@\h ${PWD##/*/}]\$ ' does change the
upstream behaviour how?
The aim is not making the upstream developer do "the right thing" but introduce
a sense of continuity with regard to the prompt-style.
Using above PS1 prompt does not even need a patch in bash.
Sorry; what I'm saying is that I don't think it's worth it to change PSx to work around bash changes. Okay, I get you now. However, how do you suggest a consistent looking prompt on the shell can be achieved (by default, not by changing settings after the installation)? As I wrote above, people are used to the style they have been using for quite some years. Therefore I do think it is diserable to keep the former prompt-style. Whether this is achieved by patching the shell or by adapting some setup-scripts is debatable. I guess, changing the bashrc is the easiest way of reaching this aim. Or is the consistent look of the prompt not an issue at all? |