Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: TRAPEXIT question



>>>>> "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