zsh-users
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Nate Johnston <nmj3e@virginia.edu>, zsh-users@math.gatech.edu
Subject: Re: Mailpath notification message
Date: Tue, 5 Nov 1996 13:19:29 -0800	[thread overview]
Message-ID: <961105131929.ZM5724@candle.brasslantern.com> (raw)
In-Reply-To: Nate Johnston <nmj3e@virginia.edu> "Re: Mailpath notification message" (Nov  5,  3:13pm)

On Nov 5,  3:13pm, Nate Johnston wrote:
} Subject: Re: Mailpath notification message
}
} Quite a while ago, there was a person asking how to string long lines into
} his MAILPATH.  This is (approximately) what was written as an answer,
} perhaps by Mr. Stephenson (if I remember truly).

Nope, it was me.

} setopt magic_equal_subst                # for `export foo=~/bar`
} function export() { EXPORT=${1%%\=*} ; typeset -Ux $* }
} function +() { eval builtin export ${EXPORT}=\$\{$EXPORT\}:\$1 }
} # some stuff snipped
} export MAILPATH=        "~/mail/in/inbox?Mail in folder 1"
}                 +       "~/.samizdat/in/inbox?Mail in filder 2"
} # more snipped 
} unfunction export +
} 
} This used to work for me.  Now however, I get the message that the second
} one (~/.samizdat..etc) is not an identifier.

The first export has to look like a real variable assignment:

export MAILPATH="~/mail/in/inbox?Mail in folder 1"
	+	"~/.samizdat/in/inbox?Mail in filder 2"

It was never supposed to work with spaces after the `=' sign; that it ever
did was because of poor parsing in eariler versions of zsh.

Also, putting quotes around the leading `~' protects that from expansion
even with magic_equal_subst set, so the eventual value of the variable is:

    ~/mail/in/inbox?Mail in folder 1:~/.samizdat/in/inbox?Mail in filder 2

Which I *think* works for $MAILPATH but would not work for $PATH etc.  It
would be better to say (note position of the quotes):

export MAILPATH=~/mail/in/inbox"?Mail in folder 1"
	+	~/.samizdat/in/inbox"?Mail in filder 2"

Finally, what's a filder? ;->

-- 
Bart Schaefer                             Brass Lantern Enterprises
http://www.well.com/user/barts            http://www.nbn.com/people/lantern


  reply	other threads:[~1996-11-05 21:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-10-24  4:37 Rusty Hoover
1996-10-24  5:20 ` Jason L Tibbitts III
1996-11-05 20:13   ` Nate Johnston
1996-11-05 21:19     ` Bart Schaefer [this message]
1996-11-06  5:56       ` Dan Nelson
1996-10-24  7:35 ` Peter Stephenson
1996-10-24  8:41   ` Duncan Sargeant
1996-10-24  9:11     ` Peter Stephenson

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=961105131929.ZM5724@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=nmj3e@virginia.edu \
    --cc=schaefer@nbn.com \
    --cc=zsh-users@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).