zsh-workers
 help / color / mirror / code / Atom feed
* Re: Mailpath notification message
       [not found] <199610240841.QAA00731@mermaid.ucc.gu.uwa.edu.au>
@ 1996-10-24  9:37 ` Zoltan Hidvegi
  0 siblings, 0 replies; only message in thread
From: Zoltan Hidvegi @ 1996-10-24  9:37 UTC (permalink / raw)
  To: Duncan Sargeant; +Cc: Zsh workers list

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1996-10-24  9:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <199610240841.QAA00731@mermaid.ucc.gu.uwa.edu.au>
1996-10-24  9:37 ` Mailpath notification message Zoltan Hidvegi

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).