Johannes Altmanninger
7ef7f93a90
List time as builtin, support time --help
...
`a=b time foo` will no longer call an external `time` command
(like it does in bash).
Fixes #6598
2020-02-23 23:42:57 +01:00
Aaron Gyes
d556f04823
Revert "timer.cpp: use units like 'ms', etc. vs. "millis""
...
This reverts commit c01356ddd1
.
Tests broken
2020-02-12 02:06:30 -08:00
Aaron Gyes
c01356ddd1
timer.cpp: use units like 'ms', etc. vs. "millis"
...
Change wording and omit '.00' decimal points in times
2020-02-12 01:53:48 -08:00
Fabian Homborg
24970bb549
checks: Use "sleep" without "s" suffix
...
FreeBSD's sleep doesn't accept it.
2020-01-05 18:41:56 +01:00
Johannes Altmanninger
c3374edc59
Reject time with background jobs
...
This check could probably done earlier in the parser but it works.
2020-01-03 01:07:49 -06:00
Johannes Altmanninger
3de95038b0
Make "time" a job prefix
...
In particular, this allows `true && time true`, or `true; and time true`,
and both `time not true` as well as `not time true` (like bash).
time is valid only as job _prefix_, so `true | time true` could call
`/bin/time` (same in bash)
See discussion in #6442
2020-01-03 01:07:49 -06:00
Fabian Homborg
dcf8b0e3aa
Add test for time
2019-12-20 17:13:21 +01:00