Exporting $PS1.

Dan Nicholson dbn.lists at gmail.com
Sun Mar 11 13:32:07 PDT 2007


On 3/11/07, Ag. Hatzimanikas <a.hatzim at gmail.com> wrote:
>
> I am using zsh as my login shell and I made a small experiment.
>
> Steps:
> 1.
> a) Removed ~/.bashrc
> b) Export the PS1 in ~/.zshrc.
>
> Result:
> [ag][401](~)bash
> [%{%}%n%{%}][%{%}%h%{%}](%{%}%~%{%})
>
>
> 2.
> a) Removed ~/.bashrc
> b) Assigned the PS1 in ~/.zshrc without exporting the variable.
>
> Result:
> [ag][401](~)bash
> bash-3.1$ echo $PS1
> \s-\v\$
>
> Conclusion.
> Exporting the PS1 variable is a bad idea.

I got the same problems when playing around with dash, but I'd never
given it much thought. I think this is a good point and I'm gonna
change all my shell setting files to not export PS1.

--
Dan



More information about the blfs-dev mailing list