mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-21 00:31:15 -03:00
This would break the location of any prior errors without doing anything of value. E.g. ```fish echo foo | exec grep # this exec is not allowed! $status somethingelse # The error might be found here! ``` Would apply the offset of `$status` to the offset of `exec`, locating the error for `exec` somewhere after $status!
13 lines
412 B
Fish
13 lines
412 B
Fish
#RUN: %fish -C 'set -g fish %fish' %s
|
|
|
|
# A $status used as a command should not impact the location of other errors.
|
|
echo 'echo foo | exec grep # this exec is not allowed!
|
|
|
|
$status
|
|
|
|
# The error might be found here!' | $fish 2>| string replace -r '(.*)' '<$1>'
|
|
|
|
# CHECK: <fish: The 'exec' command can not be used in a pipeline>
|
|
# CHECK: <echo foo | exec grep # this exec is not allowed!>
|
|
# CHECK: < ^>
|