Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: what does 'interactive' mean?

On 2021-08-10 5:12 a.m., Peter Stephenson wrote:

Of course, there may still be something I'm missing.

I had my panic attack the first time I came across this 'interactive' business  and like Thomas I was at a loss to figure out what this came down to in practice.  Naturally some scripts don't ask for input and some do, but it seemed to me that -- well, if they do they do and if they don't they don't but why do I have to 'set' anything?  What do I break if I get it wrong?

" to see if it's appropriate to output prompts, use the line editor,
etc. etc. "

There's the start of an answer.  But if I put a 'read' or an 'echo' in my script, then surely it must be interactive?  It just is.  How could that be made non interactive?  I remember just deciding to ignore INTERACTIVE and hope for the best and AFAICT it never bothered me not knowing.  My scripts and functions interact whenever I ask them to.  What would it mean if I asked them not to interact?  Dunno, I now sorta get the idea that before my prompt shows up, I might be asking zsh to do all sorts of setup stuff in the background and I don't want a prompt from that stuff so by commanding it to be non interactive I leave my interactive prompt alone.  Sorta?  interactive ~= background?

Messages sorted by: Reverse Date, Date, Thread, Author