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

Re: print returning via REPLY



On Sep 20,  7:59am, Sebastian Gniazdowski wrote:
}
} The code of print builtin is rich into various states. I was thinking
} about adding REPLY support to it, but it seems to be too complicated
} for me. Maybe someone has better overview of the various states of the
} function, and could add the REPLY support? Maybe it isn't actually
} hard? My motivation behind this is to be able to quickly expand tabs -
} doing a fork to read print's output is slow.

This would require moving the first block of HAVE_OPEN_MEMSTREAM stuff
(and it's #else, of course) from below the OPT_HASARG(ops, 'x') test
to above it, so that the result of the tab processing is captured;
and then figuring out how/where to do the corresponding cleanup (maybe
just a "goto" that jumps to the near the end of the function).

Aside, the doc doesn't actually say that -x can't be used with -z/-s/-f
(and print doesn't complain about the attempt) even though that is the
case.



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