profile: export PS1, don't just set it.
Technically the profile is supposed to be sourced, but it seems that some scenarios / applications do not do this and instead run it. Before the recent changes to PS1, it was also exported, and now it is again. Should fix entering HaikuPorter chroots under the new profile. Also renamed "ARCH" to "_ARCH" to better accomodate those who are sourcing this file, in case they want to pass a variable named ARCH through.
This commit is contained in:
parent
ca20bd2e48
commit
57ab322d67
@ -3,17 +3,17 @@
|
||||
# Place user customizations in ~/config/settings/profile
|
||||
#
|
||||
|
||||
ARCH=`getarch 2>/dev/null`
|
||||
if [ "$ARCH" = "`getarch -p 2>/dev/null`" ] ; then
|
||||
_ARCH=`getarch 2>/dev/null`
|
||||
if [ "$_ARCH" = "`getarch -p 2>/dev/null`" ] ; then
|
||||
echo -e "\nWelcome to the Haiku shell.\n"
|
||||
PS1="\w"
|
||||
else
|
||||
echo -e "\nSwitching to architecture `getarch`\n"
|
||||
PS1="[$ARCH] \w"
|
||||
PS1="[$_ARCH] \w"
|
||||
fi
|
||||
unset ARCH
|
||||
unset _ARCH
|
||||
|
||||
PS1="\["'`if [ $? = 0 ]; then echo "\e[32m";
|
||||
export PS1="\["'`if [ $? = 0 ]; then echo "\e[32m";
|
||||
else echo "\e[31m"; fi`'"\]$PS1\[\e[0m\]> "
|
||||
|
||||
export USER=`id -un`
|
||||
|
Loading…
x
Reference in New Issue
Block a user