Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: "setopt noexec" and interactive shells
- X-seq: zsh-workers 13801
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: "setopt noexec" and interactive shells
- Date: Tue, 27 Mar 2001 19:18:16 +0000
- In-reply-to: <E14hxtw-0005n6-00@xxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <E14hxtw-0005n6-00@xxxxxxxxxxxxxxxxxx>
On Mar 27, 7:09pm, Zefram wrote:
} Subject: Re: "setopt noexec" and interactive shells
}
} Bart Schaefer wrote:
} >There's no way to make the option un-, or rather re-, settable because
} >once you're not executing commands the state of the shell is effectively
} >frozen.
}
} By "unsettable" I meant that the shell does not permit one to change
} the state of the option.
Aha. But, unlike `interactive', there's no reason not to allow `noexec'
to become set in a shell function, provided that it's going to be restored
again by `localoptions' when the function exits.
That was why my original (some weeks ago) patch reset the option just
before the prompt was printed, rather than disabling it at some lower
level.
} I'm basically happy with your patch (or the revised version) in
} that it retains the state of NO_EXEC and simply denies it effect,
} the way ksh does.
}
} As I suggested above, I'd prefer that that condition be
}
} if (unset(EXECOPT) && unset(INTERACTIVE))
That's fine with me, too, but I'd still like to hear any thoughts you
have on making `noexec' work within a shell function.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by:
Reverse Date,
Date,
Thread,
Author