mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-22 10:11:13 -03:00
Emit an error if time is used past the first command in a pipeline
Fixes #8841
This commit is contained in:
@@ -11,6 +11,12 @@ $status
|
||||
# CHECK: <echo foo | exec grep # this exec is not allowed!>
|
||||
# CHECK: < ^>
|
||||
|
||||
echo 'true | time false' | $fish 2>| string replace -r '(.*)' '<$1>'
|
||||
# CHECK: <fish: The 'time' command may only be at the beginning of a pipeline>
|
||||
# CHECK: <true | time false>
|
||||
# CHECK: < ^>
|
||||
|
||||
|
||||
echo '
|
||||
|
||||
(true one)
|
||||
|
||||
Reference in New Issue
Block a user