mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-07 01:51:14 -03:00
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
This commit is contained in:
committed by
Mahmoud Al-Qudsi
parent
c1140bc436
commit
3de95038b0
@@ -25,3 +25,21 @@ time echo 'foo -s bar'
|
||||
#CHECKERR: Executed in {{[\d,.\s]*}} {{millis|micros|secs}} {{\s*}}fish {{\s*}}external
|
||||
#CHECKERR: usr time {{[\d,.\s]*}} {{millis|micros|secs}} {{[\d,.\s]*}} {{millis|micros|secs}} {{[\d,.\s]*}} {{millis|micros|secs}}
|
||||
#CHECKERR: sys time {{[\d,.\s]*}} {{millis|micros|secs}} {{[\d,.\s]*}} {{millis|micros|secs}} {{[\d,.\s]*}} {{millis|micros|secs}}
|
||||
|
||||
true && time a=b not builtin true | true
|
||||
#CHECKERR: ___{{.*}}
|
||||
#CHECKERR: {{.*}}
|
||||
#CHECKERR: {{.*}}
|
||||
#CHECKERR: {{.*}}
|
||||
|
||||
PATH= time true
|
||||
#CHECKERR: fish: Unknown command: time
|
||||
#CHECKERR: {{.*}}
|
||||
#CHECKERR: PATH= time true
|
||||
#CHECKERR: ^
|
||||
|
||||
not time true
|
||||
#CHECKERR: ___{{.*}}
|
||||
#CHECKERR: {{.*}}
|
||||
#CHECKERR: {{.*}}
|
||||
#CHECKERR: {{.*}}
|
||||
|
||||
Reference in New Issue
Block a user