From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gatech.edu (gatech.edu [130.207.244.244]) by werple.mira.net.au (8.6.12/8.6.9) with SMTP id DAA02543 for ; Fri, 16 Jun 1995 03:19:51 +1000 Received: from math (math.skiles.gatech.edu) by gatech.edu with SMTP id AA23540 (5.65c/Gatech-10.0-IDA for ); Thu, 15 Jun 1995 13:19:37 -0400 Received: by math (5.x/SMI-SVR4) id AA10829; Thu, 15 Jun 1995 13:16:45 -0400 Resent-Date: Thu, 15 Jun 95 18:17:09 BST Old-Return-Path: From: Anthony Iano-Fletcher Date: Thu, 15 Jun 95 18:17:09 BST Message-Id: <9506151717.AA26957@guinness> To: zsh-workers@math.gatech.edu Subject: interact Resent-Message-Id: <"HRykT1.0.7f2.yh6ul"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/105 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu 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. Ive looked at the source and it would seem that the command source /dev/tty will do most of what I want (except give a prompt and have the zle command line editting work). I have 2 options.... 1. special case the command 'source /dev/tty' to set the options INTERACTIVE and SHINSTDIN before the tty is read in the source function in utils.c. You will still get the original behavour using 'source //dev/tty'. 2. allow the source (and .) built-ins to accept a -i flag,i.e. source -i /dev/tty to force it into a fit state for an interactive session. This involves small modifications to the source function in utils.c and to the bin_dot function in builtins.c. There is a slight variation is option 1 and that is to special case 'source /dev/xxxxx', whatever xxxxx may be. I have implemented both versions to try them out and Im happy with them all. I would welcome any comments. To put this in its historical context.... this is not the first time that I've wished to run a script setting up various functions and variables and then wanted to pass control to the user. I find that my only existing solution is clumsy. Anthony.