From: Antoine Pietri <antoine.pietri1@gmail.com>
To: zsh-workers@zsh.org
Subject: zsh built-in commands are removed when passing through a built-in command that spawns commands
Date: Wed, 15 May 2013 16:14:01 +0200 [thread overview]
Message-ID: <CAOMH6m1ksarUHLQur75UCMnbbvsTAjWrFsYcexoxmP3vN7a-MQ@mail.gmail.com> (raw)
Hello,
An example is way simpler than long explanations:
% while true; do time cat; done
cat 0,00s user 0,00s system 0% cpu 0,363 total
cat 0,00s user 0,00s system 0% cpu 0,162 total
cat 0,00s user 0,00s system 0% cpu 0,168 total
cat 0,00s user 0,00s system 0% cpu 0,163 total
cat 0,00s user 0,00s system 0% cpu 0,157 total
^C
cat 0,00s user 0,00s system 0% cpu 0,195 total
It only displays the zsh "time" built-in. I also have a binary `time`
which displays a formatted output like this:
0.00user 0.00system 0:00.46elapsed 0%CPU (0avgtext+0avgdata 636maxresident)k
0inputs+0outputs (0major+206minor)pagefaults 0swaps
And zsh actually displays this kind of output when I try to time a
command which contains time:
% time (while true; do time cat; done)
0.00user 0.00system 0:00.46elapsed 0%CPU (0avgtext+0avgdata 636maxresident)k
0inputs+0outputs (0major+206minor)pagefaults 0swaps
0.00user 0.00system 0:00.43elapsed 0%CPU (0avgtext+0avgdata 636maxresident)k
0inputs+0outputs (0major+206minor)pagefaults 0swaps
0.00user 0.00system 0:00.22elapsed 0%CPU (0avgtext+0avgdata 636maxresident)k
0inputs+0outputs (0major+207minor)pagefaults 0swaps
0.00user 0.00system 0:00.21elapsed 0%CPU (0avgtext+0avgdata 636maxresident)k
0inputs+0outputs (0major+206minor)pagefaults 0swaps
^CCommand terminated by signal 2
0.00user 0.00system 0:00.52elapsed 0%CPU (0avgtext+0avgdata 604maxresident)k
0inputs+0outputs (0major+198minor)pagefaults 0swaps
( while true; do; time cat; done; ) 0,00s user 0,00s system 0% cpu 1,884 total
Only the last line is the result of an actual zsh-time, the rest is
the `time` binary.
A bit wibbly-woobly… time-y wimey ?
Regards,
--
Antoine Pietri
next reply other threads:[~2013-05-15 14:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-15 14:14 Antoine Pietri [this message]
2013-05-15 17:24 ` Bart Schaefer
2013-05-15 17:26 ` Antoine Pietri
2013-05-15 17:33 ` Bart Schaefer
2013-05-15 19:28 ` Bart Schaefer
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=CAOMH6m1ksarUHLQur75UCMnbbvsTAjWrFsYcexoxmP3vN7a-MQ@mail.gmail.com \
--to=antoine.pietri1@gmail.com \
--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).