mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-21 00:31:15 -03:00
Check for unsupported "time &" in the proper place
This means we can detect this error also for simple blocks. While at it do some cleanup in the area.
This commit is contained in:
@@ -68,7 +68,7 @@ $fish -c 'echo {$,}'
|
||||
|
||||
echo "bind -M" | $fish
|
||||
# CHECKERR: bind: -M: option requires an argument
|
||||
# CHECKERR: Standard input (line 1):
|
||||
# CHECKERR: Standard input (line 1):
|
||||
# CHECKERR: bind -M
|
||||
# CHECKERR: ^
|
||||
# CHECKERR: (Type 'help bind' for related documentation)
|
||||
@@ -118,6 +118,11 @@ $fish -c 'echo (time echo foo &)'
|
||||
# CHECKERR: echo (time echo foo &)
|
||||
# CHECKERR: ^~~~~~~~~~~~~~~~^
|
||||
|
||||
$fish -c 'time begin; end &'
|
||||
# CHECKERR: fish: 'time' is not supported for background jobs. Consider using 'command time'.
|
||||
# CHECKERR: time begin; end &
|
||||
# CHECKERR: ^~~~~~~~~~~~~~~~^
|
||||
|
||||
$fish -c 'echo (set -l foo 1 2 3; for $foo in foo; end)'
|
||||
# CHECKERR: fish: Unable to expand variable name ''
|
||||
# CHECKERR: set -l foo 1 2 3; for $foo in foo; end
|
||||
|
||||
Reference in New Issue
Block a user