Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: interact
- X-seq: zsh-workers 107
- From: Anthony Iano-Fletcher <Anthony.Iano-Fletcher@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxxx
- Subject: Re: interact
- Date: Fri, 16 Jun 1995 13:32:08 +0100 (BST)
Hi Peter,
Thanks for your response.
> > I recieved no response to my question about how to turn control
> > over to a user for an interactive session part way through running
> > a zsh script, in the same way that you can in the expect language.
>
> It's currently impossible to do this properly since there's no way of
> changing the `interactive' option. In principle, you could move the
> setting of the interactive option into the code I just adapted to be
> run both when the shell starts up and after `exec <...', which already
> checks for a tty. You probably have to wait a bit for that code to
> show up.
Fine I can wait...... Would this allow for the zsh script to call for
more that one interactive sessions? or to continue executing after
the exec? Surely if I do
exec < /dev/tty
and the user types control-D then the shell will exit.
Your message makes me realise that instead of the 2 schemes Ive
already suggested for source I should just check if the specifed file
is a terminal (using isatty) and if it is go 'interactive'. This
is an easy modification.
Anthony.
--
Anthony Iano-Fletcher
e-mail: Anthony.Iano-Fletcher@xxxxxxxxxxxxxxxx
post: Maths Dept, Uni. of Nottingham, Nottingham, NG7 2RD, UK
telephone: (+44) (115) 951-4945
Messages sorted by:
Reverse Date,
Date,
Thread,
Author