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

Re: PATCH (and another bug report): Re: zsh script and SIGCONT



On Dec 14, 10:13am, Sven Wischnowsky wrote:
} Subject: Re: PATCH (and another bug report): Re: zsh script and SIGCONT
}
} Bart Schaefer wrote:
} 
} > So I was about to suggest that we should simply turn off MONITOR during
} > `.' and `source' [...]
} 
} [...] Somehow I think it should either suspend the `.' or the loop
} (the top-level construct in the sourced file). The latter if we think
} of the sourced file as an equivalent of command line input.

If it's going to suspend anything, it should be the `.'.  It's NOT
equivalent to command-line input, because zsh doesn't deal with infinite
typeahead.  It's closest to executing a shell function, with no local
parameter context.

However, we certainly don't want startup rc-files to get backgrounded
if one of them happens to do something that gives the user time to press
^Z.  And I can see an argument for wanting to be able to suspend an
individual command without interrupting startup processing entirely.
And it definitely doesn't make any sense to background *that*.

It's a tricky situation.  The only useful criteria seems to me to be
whether the user can reasonably expect to get back to a shell prompt when
he presses ^Z.  If the `.' command is going to violate that expectation,
then at least the doc should say so somewhere.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



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