Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Mailpath notification message
- X-seq: zsh-users 492
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: Nate Johnston <nmj3e@xxxxxxxxxxxx>, zsh-users@xxxxxxxxxxxxxxx
- Subject: Re: Mailpath notification message
- Date: Tue, 5 Nov 1996 13:19:29 -0800
- In-reply-to: Nate Johnston <nmj3e@xxxxxxxxxxxx> "Re: Mailpath notification message" (Nov 5, 3:13pm)
- References: <Pine.A32.3.93.961105150915.41870B-100000@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Reply-to: schaefer@xxxxxxx
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author