From: Peter Stephenson <p.stephenson@samsung.com>
To: Josh Junon <junon@zeit.co>, zsh-workers@zsh.org
Subject: Re: REPORTTIME=0 with the option to disable for tab completion
Date: Wed, 17 Jan 2018 15:44:02 +0000 [thread overview]
Message-ID: <20180117154402.4eb3c48b@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <CABLBuqEzF_0mY6V4A+N_0xwh8HJ2cM245m8NhbWu5KwLNBBTNA@mail.gmail.com>
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.
prev parent reply other threads:[~2018-01-17 15:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20180117151906epcas3p4efb5b1c031a4365551432f5a83275b40@epcas3p4.samsung.com>
2018-01-17 15:18 ` Josh Junon
2018-01-17 15:44 ` Peter Stephenson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180117154402.4eb3c48b@pwslap01u.europe.root.pri \
--to=p.stephenson@samsung.com \
--cc=junon@zeit.co \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).