Description of problem: After upgrading to RHEL4, the same "problem" as on FC3 appears: The PS1 bash-prompt shows the following: [root@build ~]# According to http://cnswww.cns.cwru.edu/~chet/bash/NEWS this is the normal behaviour. I would expect the prompt to show the previous look from RHEL3 and former Red Hat Linux products: [root@horscht root]# The Homedir should not be abbreviated by a ~. I'd like to see RH introduce either a bash patch which restores the former behaviour or, which might be the more sensible choice, adapt the /etc/bashrc.
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?