baslinux AT lists.ibiblio.org
Subject: Baslinux mailing list
List archive
- 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
-
Re: [BL] shell scripting
, (continued)
- Re: [BL] shell scripting, sindi keesan, 01/07/2005
- Re: [BL] shell scripting, 3aoo-cvfd, 01/07/2005
- [BL] BL3 with dosemu, sindi keesan, 01/07/2005
- Re: [BL] BL3 with dosemu, sindi keesan, 01/07/2005
- Re: [BL] BL3 with dosemu, sindi keesan, 01/07/2005
- Re: [BL] BL3 with dosemu, 3aoo-cvfd, 01/07/2005
- Re: [BL] BL3 with dosemu, sindi keesan, 01/07/2005
- Re: [BL] shell scripting, sindi keesan, 01/07/2005
- Re: [BL] shell scripting, Stephen Clement, 01/07/2005
- Re: [BL] shell scripting, sindi keesan, 01/07/2005
- Re: [BL] shell scripting, 3aoo-cvfd, 01/07/2005
- Re: [BL] shell scripting, sindi keesan, 01/07/2005
- Re: [BL] shell scripting, sindi keesan, 01/07/2005
- Re: [BL] shell scripting, sindi keesan, 01/07/2005
- Re: [BL] shell scripting, 3aoo-cvfd, 01/08/2005
- Re: [BL] shell scripting, sindi keesan, 01/08/2005
-
Re: [BL] shell scripting,
sindi keesan, 01/07/2005
-
Re: [BL] shell scripting,
3aoo-cvfd, 01/07/2005
- Re: [BL] shell scripting, sindi keesan, 01/07/2005
-
Re: [BL] shell scripting,
3aoo-cvfd, 01/07/2005
Archive powered by MHonArc 2.6.24.