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

Re: PATCH: sysopen (was Re: '>>' does not create file if set -C (noclobber) is active)



On Thu, 23 Jul 2015 04:56:58 +0200
Oliver Kiddle <okiddle@xxxxxxxxxxx> wrote:
> On 28 Jun, Bart wrote:
> > Therefore the sysopen suggestion is probably the most appropriate one.
> 
> The following patch adds that to the system module along with sysseek
> and systell. systell is in the form of a math function which I think
> is less awkward to use than a builtin.

One very minor comment now I've tried this:

% sysread -i fd
sysread: integer expected: fd

I think it would probably be appropriate and consistent with other
similar contexts for this to do matn eval, even though the workaround is
obvious and trivial.  C.f. "sysopen -u fd" (though of course there's no
choice in that case) and

% print $(( systell(fd) ))
8192

However, we're not actually missing anything by not.

pws



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