zsh-workers
 help / color / mirror / code / Atom feed
* print returning via REPLY
@ 2015-09-20  5:59 Sebastian Gniazdowski
  2015-09-20  6:25 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Gniazdowski @ 2015-09-20  5:59 UTC (permalink / raw)
  To: zsh-workers

Hello
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.

Best regards,
Sebastian Gniazdowski


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: print returning via REPLY
  2015-09-20  5:59 print returning via REPLY Sebastian Gniazdowski
@ 2015-09-20  6:25 ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2015-09-20  6:25 UTC (permalink / raw)
  To: zsh-workers

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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-09-20  6:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-20  5:59 print returning via REPLY Sebastian Gniazdowski
2015-09-20  6:25 ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).