* REPORTTIME=0 with the option to disable for tab completion
@ 2018-01-17 15:18 ` Josh Junon
2018-01-17 15:44 ` Peter Stephenson
0 siblings, 1 reply; 2+ messages in thread
From: Josh Junon @ 2018-01-17 15:18 UTC (permalink / raw)
To: zsh-workers
[-- Attachment #1: Type: text/plain, Size: 443 bytes --]
Hi there,
Recently discovered the `REPORTTIME` environment variable and have found it
invaluable to my workflow.
However, it appears to run even for tab completion as well. While I
understand the reasoning behind it, it makes tab completion kind of
pointless since the entire screen fills with `time` output.
Could there be a way to have `REPORTTIME=0` enabled without having it
run/output anything upon tab completion?
Thank you!
- Josh
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: REPORTTIME=0 with the option to disable for tab completion
2018-01-17 15:18 ` REPORTTIME=0 with the option to disable for tab completion Josh Junon
@ 2018-01-17 15:44 ` Peter Stephenson
0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 2018-01-17 15:44 UTC (permalink / raw)
To: Josh Junon, zsh-workers
On Wed, 17 Jan 2018 15:18:16 +0000
Josh Junon <junon@zeit.co> wrote:
> Recently discovered the `REPORTTIME` environment variable and have found it
> invaluable to my workflow.
>
> However, it appears to run even for tab completion as well. While I
> understand the reasoning behind it, it makes tab completion kind of
> pointless since the entire screen fills with `time` output.
>
> Could there be a way to have `REPORTTIME=0` enabled without having it
> run/output anything upon tab completion?
It's not special, so I think you can simply do
diff --git a/Completion/compinit b/Completion/compinit
index c345ceb..f0f8421 100644
--- a/Completion/compinit
+++ b/Completion/compinit
@@ -175,7 +175,9 @@ typeset -gH _comp_setup='local -A _comp_caller_options;
exec </dev/null;
trap - ZERR;
local -a reply;
- local REPLY'
+ local REPLY;
+ local REPORTTIME;
+ unset REPORTTIME'
# These can hold names of functions that are to be called before/after all
# matches have been generated.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-01-17 15:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20180117151906epcas3p4efb5b1c031a4365551432f5a83275b40@epcas3p4.samsung.com>
2018-01-17 15:18 ` REPORTTIME=0 with the option to disable for tab completion Josh Junon
2018-01-17 15:44 ` Peter Stephenson
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).