Skip to Content.
Sympa Menu

baslinux - Re: [BL] shell scripting

baslinux AT lists.ibiblio.org

Subject: Baslinux mailing list

List archive

Chronological Thread  
  • From: 3aoo-cvfd AT dea.spamcon.org
  • To: baslinux AT lists.ibiblio.org
  • Subject: Re: [BL] shell scripting
  • Date: Sat, 8 Jan 2005 14:51:38 +1300

sindi keesan wrote:
>
> zsh gives me \w<\$>

It appears that zsh is reading /etc/profile
because that's where PS1 (the prompt string)
is set to \w<\$>

For bash and ash, \w means: current directory
Apparently for zsh, \w means: \w

It is possible to design /etc/profile to feed
different shells. For example:
------------------------------------
if [ "$SHELL" = "/bin/ksh" ]; then
PS1="! $ "
elif [ "$SHELL" = "/bin/zsh" ]; then
PS1="%n@%m:%~%# "
else
PS1='\w<\$>'
fi
------------------------------------
The above will only work if $SHELL correctly
shows /bin/ksh and /bin/zsh for those shells.
You might want to check that first:
-----------
echo $SHELL
-----------

Cheers,
Steven

____________________________
http://www.basiclinux.com.ru




Archive powered by MHonArc 2.6.24.

Top of Page