You are not logged in.
Pages: 1
I have a problem with zsh.
If i use zsh, login does not read /etc/profile.
If I use bash, it does.
Then if I fix this with ~/.zshrc, it doesnt set PS1 & PS2.
I know it is reading /etc/profile if I login using bash, because I put a couple of echo $PS1s in. But if I login using zsh as my shell, there are no echoed PS1s to be seen, and I get default values for the things I set in /etc/profile.
TIA
--(*(cs25x--));
Offline
/etc/profile is a bash file, zsh doesn't use this.
Offline
Adding "source /etc/profile" or ". /etc/profile" to your ~/.zshrc probably fixes it.
Offline
i3839 : (
well, it did something, but not what I wanted. It ecohed the color control string for my user PS1 .
However it is a start, so I will go read manual.
Thanks.
--(*(cs25x--));
Offline
I found the easiest way was to simply add the rest of my PATH to it. (As for PS1, I have a custom girlyman zsh prompt, that imitates Gentoo's colors--if you want it it's
PS1=$'%{e[1;32m%}%n@%{e[1;34m%}%m %{e[1;36m%}%1d %{e[1;36m%}%#%{e[0m%} '
)
Actually, the colors might be different, don't remember when I finally decided on a scheme that I liked.
Added a few minutes later--just took a look at the man page, and actually, it's supposed to source /etc/profile. However, when I added that to .zshrc I got what you got, an odd looking prompt. I assume there's something in there I'm missing, but I'm too lazy to look into it now.
Offline
I added this to /etc/zshenv
# load profiles from /etc/profile.d
# (to disable a profile, just remove execute permission on it)
for profile in /etc/profile.d/*.sh; do
if [ -x $profile ]; then
. $profile
fi
done
unset profile
# End of file
And where were all the sportsmen who always pulled you though?
They're all resting down in Cornwall
writing up their memoirs for a paper-back edition
of the Boy Scout Manual.
Offline
Ah, that works too. Thanks
However, when I did that (more or less copying /etc/profile to /etc/zshenv I do get, as I log in, a message that there are no profiles in profile.d. Commenting out that last part in /et/zshenv, however, seems to make it work as it should
Thanks again
Offline
Pages: 1