Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: How sensible is ... ?
- X-seq: zsh-workers 4897
- From: Phil Pennock <comet@xxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxxx
- Subject: Re: How sensible is ... ?
- Date: Wed, 13 Jan 1999 12:01:53 +0000
- In-reply-to: <9901131117.AA60050@xxxxxxxxxxxxxxxxx>; from "Peter Stephenson" on Wed 13 Jan 1999 (12:17 +0100)
- Mail-followup-to: zsh-workers@xxxxxxxxxxxxxxx
- Organisation: Organisation? Here? No, over there ---->
- References: <19990113110951.A6955@xxxxxxxx> <9901131117.AA60050@xxxxxxxxxxxxxxxxx>
Typing away merrily, Peter Stephenson produced the immortal words:
> > Is this a sufficient test? It /seems/ to work as I want ...
>
> In this particular case, you don't need it, since return will function
> like exit in a script.
*doh*
> foo=global
> local foo >/dev/null
> if [[ $foo = global ]]; then
> print At top level
> else
> print Inside a function
> fi
I found that using 'alias' inside there failed to work (in an autoloaded
function anyway) and had to convert to a function. And useing 'typeset
-f leavecmd' then defining it after a possible 'setopt localfunctions',
it remained in scope. I'm at work and decided against spending more time
on that so just used TRAPEXIT to unfunction it -- maybe I'm just doing
something wrong ...
All this just for a really nice version of xtitle ...
--
--> Phil Pennock ; GAT d- s+:+ a23 C++(++++) UL++++/I+++/S+++/H+ P++@ L+++
E-@ W(+) N>++ o !K w--- O>+ M V !PS PE Y+ PGP+ t-- 5++ X+ R !tv b++>+++ DI+ D+
G+ e+ h* r y?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author