From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-workers-request@euclid.skiles.gatech.edu Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by coral.primenet.com.au (8.7.5/8.7.3) with ESMTP id TAA05887 for ; Thu, 24 Oct 1996 19:41:35 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id FAA26549; Thu, 24 Oct 1996 05:37:57 -0400 (EDT) Resent-Date: Thu, 24 Oct 1996 05:37:57 -0400 (EDT) From: Zoltan Hidvegi Message-Id: <199610240937.LAA23445@bolyai.cs.elte.hu> Subject: Re: Mailpath notification message In-Reply-To: <199610240841.QAA00731@mermaid.ucc.gu.uwa.edu.au> from Duncan Sargeant at "Oct 24, 96 04:41:16 pm" To: dunc@ucc.gu.uwa.edu.au (Duncan Sargeant) Date: Thu, 24 Oct 1996 11:37:46 +0200 (MET DST) Cc: zsh-workers@math.gatech.edu (Zsh workers list) Organization: Dept. of Comp. Sci., Eotvos University, Budapest, Hungary Phone: (36 1)2669833 ext: 2667, home phone: (36 1) 2752368 X-Mailer: ELM [version 2.4ME+ PL27 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"gM8dC1.0.lU6.qZpRo"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2273 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu 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