zsh-workers
 help / color / mirror / code / Atom feed
From: Zoltan Hidvegi <hzoli@cs.elte.hu>
To: dunc@ucc.gu.uwa.edu.au (Duncan Sargeant)
Cc: zsh-workers@math.gatech.edu (Zsh workers list)
Subject: Re: Mailpath notification message
Date: Thu, 24 Oct 1996 11:37:46 +0200 (MET DST)	[thread overview]
Message-ID: <199610240937.LAA23445@bolyai.cs.elte.hu> (raw)
In-Reply-To: <199610240841.QAA00731@mermaid.ucc.gu.uwa.edu.au> from Duncan Sargeant at "Oct 24, 96 04:41:16 pm"

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


           reply	other threads:[~1996-10-24  9:41 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <199610240841.QAA00731@mermaid.ucc.gu.uwa.edu.au>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199610240937.LAA23445@bolyai.cs.elte.hu \
    --to=hzoli@cs.elte.hu \
    --cc=dunc@ucc.gu.uwa.edu.au \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).