Zsh Mailing List Archive
Messages sorted by:
Re: Completion and REPORTTIME
- X-seq: zsh-workers 30688
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Mailing-list zsh-workers <zsh-workers@xxxxxxx>
- Subject: Re: Completion and REPORTTIME
- Date: Thu, 20 Sep 2012 07:15:49 -0700
- In-reply-to: <CA+mcLN7+1OYxKkgTxS8bKO6eMZ_=OWaj=EuVPnC_70aDvzmfirstname.lastname@example.org>
- List-help: <mailto:email@example.com>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:firstname.lastname@example.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CA+mcLN7+1OYxKkgTxS8bKO6eMZ_=OWaj=EuVPnC_70aDvzmemail@example.com>
On Sep 20, 2:57pm, Julien Nicoulaud wrote:
} When REPORTTIME, time can be reported on some slow compdefs, which kinda
} breaks output. I think time reporting should be disabled in the context of
} completion functions execution, don't you ?
We should add "local REPORTTIME=0" to _comp_setup in Completion/compinit,
but that only helps for completions that go through _main_complete
(which admittedly is most of them).
It's not practical to make the low-level job control functions aware of
the completion system in order to suppress this there, and a bit ugly
to be simulating "local REPORTTIME" in the C code completion callbacks.
I suppose a generic hook for modules to toggle off time reporting (and
any other semi-automatic shell diagnostics) is a possibility.
On the other hand, the time report is printed to standard error, and it
has so far been the responsibility of the individual completers to do
redirection of stderr when they might produce diagnostics that muddy up
the display. This is a bit different because the diagnostic is from
the shell itself and could affect any operation under the right set of
circumstances. Perhaps the completion C entry point(s) should arrange
to close/restore stderr ... I believe things like _complete_debug that
do their own stderr manipulation would still work. But I'm not very
excited about that idea, either.
Messages sorted by: