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 SAA05745 for ; Thu, 24 Oct 1996 18:59:56 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id EAA25394; Thu, 24 Oct 1996 04:49:56 -0400 (EDT) Resent-Date: Thu, 24 Oct 1996 04:44:12 -0400 (EDT) From: Duncan Sargeant Message-Id: <199610240841.QAA00731@mermaid.ucc.gu.uwa.edu.au> Subject: Re: Mailpath notification message To: pws@ifh.de (Peter Stephenson) Date: Thu, 24 Oct 1996 16:41:16 +0800 (WST) Cc: zsh-users@math.gatech.edu, rusty@panix.com In-Reply-To: <199610240735.JAA27921@hydra.ifh.de> from "Peter Stephenson" at Oct 24, 96 09:35:22 am X-Distribution: This message may not reproduce, be stored in a retrieval system, or transmit disease in any form without the permissiveness of the author. X-Mailer: ELM [version 2.4 PL25 PGP2] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"JZ0D71.0.qB6.RnoRo"@euclid> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/457 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Peter Stephenson scribbled: > > Rusty Hoover wrote: > > Shouldn't this line: > > > > export MAILPATH="~/.mailspool/rusty:~/Mail/z?Zsh mail." > > > > in my .zshenv give me, whenever i return to my > > command-line prompt, the message: "Zsh mail." ? > > > > It doesn't. What am i doing wrong? Do i need spaces around the question > > mark? > > The mistake is that the ~'s are quoted, so don't expand to your home > directory: try `echo ~ "~"' and you will see what I mean. You need > something like: > > export MAILPATH=~/.mailspool/rusty:~/Mail/z'?Zsh mail.' > > (zsh does know about assignments and colons when expanding ~'s). This > is partly my fault: I had something in the FAQ when the shell was > rationalised to quote tildes in this sort of place, but deleted it > when I thought it was no longer necessary. > 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? cheers, dunc -- Duncan Sargeant, http://www.ucc.gu.uwa.edu.au/~dunc/ D2: "Are you thinking what I'm thinking, D1?" D1: "I think I am, D2!" D1 and D2: "Free Tibet!" -- "Dalai Lamas in Pyjamas", GNW.