zsh-workers
 help / color / mirror / code / Atom feed
From: P.Stephenson@swansea.ac.uk
To: zsh-workers@math.gatech.edu (Zsh hackers list)
Subject: Re: interact
Date: Fri, 16 Jun 95 15:49:23 +0100	[thread overview]
Message-ID: <30420.9506161449@pyro.swan.ac.uk> (raw)
In-Reply-To: "Anthony.Iano-Fletcher@maths.nott.ac.uk"'s message of "Fri, 16 Jun 95 13:32:08 BST." <9506161232.AA01701@guinness>

Anthony.Iano-Fletcher@maths.nott.ac.uk wrote:
> > 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.

I looked at this a little more closely --- it turns out it's not
ksh-compatible: running ksh on a file containing

print this is before
exec <file
print this is after

shows that it doesn't change command input to stdin, only input for
'read' etc.

It might therefore be better to implement this a more specific way,
like handling `setopt interactive' specially, then passing initio() or
whatever a flag saying whether it has to switch to using stdin for
input.  This is certainly feasible, though probably it ought to wait:
it looks like being a bigger change than I'd hoped to do it properly.
If done properly, though, interactive sessions should be able to
behave just like they usually do.

-- 
Peter Stephenson <P.Stephenson@swansea.ac.uk>  Tel: +44 1792 205678 extn. 4461
WWW:  http://python.swan.ac.uk/~pypeters/      Fax: +44 1792 295324
Department of Physics, University of Wales, Swansea,
Singleton Park, Swansea, SA2 8PP, U.K.


  reply	other threads:[~1995-06-16 15:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-06-16 12:32 interact Anthony Iano-Fletcher
1995-06-16 14:49 ` P.Stephenson [this message]
  -- strict thread matches above, loose matches on Subject: below --
1995-06-15 17:17 interact Anthony Iano-Fletcher
1995-06-16  9:35 ` interact P.Stephenson
1995-06-08 11:17 interact Anthony Iano-Fletcher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=30420.9506161449@pyro.swan.ac.uk \
    --to=p.stephenson@swansea.ac.uk \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).