Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
zsh built-in commands are removed when passing through a built-in command that spawns commands
- X-seq: zsh-workers 31406
- From: Antoine Pietri <antoine.pietri1@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- 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
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;        d=gmail.com; s=20120113;        h=mime-version:x-received:date:message-id:subject:from:to         :content-type:content-transfer-encoding;        bh=3JviwL5Qhe0lhrbdPp/xrlZHkbkYKFe2+Wr7F75wwlw=;        b=VGu4Nor75gJHvPnbVNGPRuLqMInCGo15O7USdot3IWNxK3xFrueZrmyFOR/EZ6JMqi         lQVedryhVJMDbCLsPIf3Tltw2vITUaWnhx7MTO4zlLM57WenpWgZkoz/EMybEYl5z3Bb         Xvds9deYEUh5y5v3j3L4xTUx0Ot5RWlTrncBKCs0hKr21fa157rbj86dxoww91j9j+TM         Q38gki9/wV7c+QxKfNxyEyq/JqKKvjSGk6bXt/UVa25bnLAOD4QskIAc9C5rt7+ZCJrD         rxpDHPohWKCL4lJleUkxFVrEIfNiqdToM/57l9oh9rK+2e0CXy0yNUwNplaQYXO9ufPu         nDRg==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author