FS#4766 - /etc/profile shouldn't contain bash specific statements
Attached to Project:
Arch Linux
Opened by Simon Morgan (sjmorgan) - Friday, 02 June 2006, 19:24 GMT
Last edited by Roman Kyrylych (Romashka) - Saturday, 09 February 2008, 15:06 GMT
Opened by Simon Morgan (sjmorgan) - Friday, 02 June 2006, 19:24 GMT
Last edited by Roman Kyrylych (Romashka) - Saturday, 09 February 2008, 15:06 GMT
|
Details
/etc/profile is sourced by a lot of shells so putting bash
specific statements in it such as:
export PS1='[\u@\h \W]\$ ' makes no sense. For instance try installing zsh and logging back in. |
This task depends upon
This task blocks these from closing
FS#6062 - files in the "filesystem" package should belong to
somewhere els
I suggest the following:
1) move /etc/skel/.bashrc and /etc/skel/.bash_profile from filesystem package into bash package
2) move these lines from /etc/profile to /etc/skel/.bash_profile:
export PS1='[\u@\h \W]\$ '
export PS2='> '
if [ "$TERM" = "xterm" -o "$TERM" = "xterm-color" -o "$TERM" = "rxvt" -o "$TERM" = "xterm-xfree86" ]; then
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
fi
3) move /etc/profile to filesystem package
Will this be changed?
Isn't "export" itself a bash-specific statement? Or bourne-specific, anyway?
http://www.faqs.org/faqs/unix-faq/faq/part5/section-6.html
ksh uses /etc/profile and .profile
Maybe newer versions of other shells too, I don't know.
Anyway I find moving all bash dot-files from filesystem to bash package more logical.
P.S.: What about LANG in /etc/profile? (I wrote about it in my last e-mail message to you)
By the way, the /etc/inputrc should also include more stuff (commented maybe, so you can uncomment it if you want) and maybe there should also be a working history where every command is saved only one time. Otherwise the history is pretty unusable since half of the ~/.bash_history file is full of "su -" "ls" and "cd". Only FreeBSD's history is worse... I don't believe that this is against the K.I.S.S. principle.
I wanted to write a feature request now, but I think it also fits in here.
inputrc (5.1 KiB)
i am asking cause /etc/profile now provides much more than the /etc/profile.bash from bash in testing.
especially sourcing the /etc/profile.d files. the one in testing doesnt have that at all