Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: TRAPEXIT question
- X-seq: zsh-workers 7359
- From: greg@xxxxxxxxxxxxxx (Greg Klanderman)
- To: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- Subject: Re: TRAPEXIT question
- Date: Wed, 4 Aug 1999 17:54:24 -0400 (EDT)
- Cc: greg@xxxxxxxxxxxxxx, zsh-workers@xxxxxxxxxxxxxx (Zsh list)
- In-reply-to: <990804044026.ZM12690@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <14247.14862.404409.655828@xxxxxxxxxxxxxxxxxxx> <990804044026.ZM12690@xxxxxxxxxxxxxxxxxxxxxxx>
- Reply-to: greg@xxxxxxxxxxxxxx
>>>>> "Bart" == Bart Schaefer <schaefer@xxxxxxxxxxxxxxxxxxxxxxx> writes:
> trip() { trap 'trap "echo trip" EXIT' EXIT }
> trip() { trap 'TRAPEXIT() { echo trip }' EXIT }
Cool. I was thinking I might try something like that next.
> Now that I've answered the question ... can you tell me what's wrong with
> using a .zlogout file instead?
Yup, that'd probably work just fine...
So is there an easy way to indirect through the value of a variable?
I know I can use eval, but, for example, in BASH you can do
foo=bar
bar=baz
echo ${!foo} -> baz
thanks,
Greg
Messages sorted by:
Reverse Date,
Date,
Thread,
Author