It's nifty to set PROMPT_COMMAND to change the title bar in xterms, but wouldn't it be better to put this in individuals' dotfiles instead of the systemwide one? It'd be nice for the standard /etc/bashrc to be as empty as possible, with all fancy stuff removed to user-configurable areas. (Sure, PROMPT_COMMAND can be set again by the user if they want to change it, but why do it twice?)
I agree. Perhaps related, note what happens when bash 1.14.7(1) does when provided with an invalid command-line argument: $ bash --version bash --version bash: --: bad option echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007" Note that those escape codes are *displayed* as shown above.
If you have e.g. 100 users on a box, it can be pretty tedious to put some new features in their .bashrc. I like addition like this in /etc/bashrc better. It's an opinion I guess. A little bug: if you have an SSH connection to somewhere and that connection breaks, the prompt isn't refreshed to reflect to your original source HOSTNAME. Just my 0.02c.
If it's a new machine, it doesn't matter if this is in the skel .bashrc or in the system-wide one -- everybody gets it anyway. And if it's an upgrade, a lot of people would prefer to not have changes like this "forced" on them. If you as the sysadmin _do_ like the change, it's easy for you to add this to /etc/bashrc, but it's nicer for that to be your decision. (Or actually, you could use a simple shell script to add it to the individual ~/.bashrc files.) As for the "bug" you mention -- that's pretty unavoidable. (And one of several reasons people may not like this feature.)
Users who don't like it can just undo it in their .bashrc - I think it's better off in the system wide file so Joe Stupid User gets nice settings even after a "What's this .bashrc file, I've never used it, open kfm/gmc click .bashrc, click delete" session.
I don't mind that there /is/ an /etc/bashrc file where admins can place system-wide stuff. What I do object to is Red Hat deciding what constitutes a 'nice setting' and putting it there for us. I've just upgraded to 6.2 from 6.1, and had to waste time figuring out where the broken PROMPT_COMMAND stuff was coming from. Now I'm going to have to remember to fix this crap everytime I do an installation. It's the same with the Red Hat-supplied /etc/inputrc, which breaks vi mode in bash. Yes, these are only opinions, but I don't like having other people's opinions installed by default. Keep it policy-free, folks.