Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Mailpath notification message
- X-seq: zsh-workers 2273
- From: Zoltan Hidvegi <hzoli@xxxxxxxxxx>
- To: dunc@xxxxxxxxxxxxxxxxx (Duncan Sargeant)
- Subject: Re: Mailpath notification message
- Date: Thu, 24 Oct 1996 11:37:46 +0200 (MET DST)
- Cc: zsh-workers@xxxxxxxxxxxxxxx (Zsh workers list)
- In-reply-to: <199610240841.QAA00731@xxxxxxxxxxxxxxxxxxxxxxxxx> from Duncan Sargeant at "Oct 24, 96 04:41:16 pm"
- Organization: Dept. of Comp. Sci., Eotvos University, Budapest, Hungary
- Phone: (36 1)2669833 ext: 2667, home phone: (36 1) 2752368
Duncan Sargeant wrote:
> I usually overcome this problem by using $HOME in my scripts. I
> think this is a better way because you can put it in the middle of
> double-quote quoted strings (but not single quotes.)
>
> export MAILPATH="$HOME/mailspool/rusty:$HOME/Mail/z?Zsh mail."
>
> IMHO its a good habit to get into.
>
> better understand parameter expansion??
>
> echo $HOME "$HOME" '$HOME' ~ "~" '~'
>
> /home/wheel/dunc /home/wheel/dunc $HOME /home/wheel/dunc ~ ~
>
>
> PS: what was the rationale behind quoting tildes? Not critising
> it, but this means it isn't a short parameter ... so what is
> it?
Quoting rules are described quite precisely in POSIX which just documents
the usuall shell behaviour. Note that in a strict POSIX shell
export MAILPATH=~/mbox:~/Mail/zsh does not expand the tildes but zsh does
similarily to other shells (but bash/ksh/pdksh probably disables this
expansion when POSIXLY_CORRECT is set). The most portable is
MAILPATH=~/mbox:~/Mail/zsh ; export MAILPATH
About MAILPATH: bash does expand the mailpath component before checking the
file so in bash MAILPATH=~/mbox:~/Mail/zsh" works. However AT&T ksh, pdksh
and zsh does not do that.
Zoltan
Messages sorted by:
Reverse Date,
Date,
Thread,
Author