Error message prefix: Prefix the message, not the context

Fixes #3649
This commit is contained in:
Andreas Nordal
2017-03-26 14:38:59 +02:00
committed by Kurtis Rader
parent 89efa9a8b1
commit 08d42a0507
11 changed files with 99 additions and 68 deletions

View File

@@ -1,33 +1,33 @@
Array index out of bounds
fish: show "$foo[2]"
^
Array index out of bounds
fish: show $foo[2]
^
Array index out of bounds
fish: show "$foo[1 2]"
^
Array index out of bounds
fish: show $foo[1 2]
^
Array index out of bounds
fish: show "$foo[2 1]"
^
Array index out of bounds
fish: show $foo[2 1]
^
Invalid index value
fish: echo "$foo[d]"
^
Invalid index value
fish: echo $foo[d]
^
Array index out of bounds
fish: echo ()[1]
^
Invalid index value
fish: echo ()[d]
^
$) is not a valid variable in fish.
fish: echo $$paren
fish: Array index out of bounds
show "$foo[2]"
^
fish: Array index out of bounds
show $foo[2]
^
fish: Array index out of bounds
show "$foo[1 2]"
^
fish: Array index out of bounds
show $foo[1 2]
^
fish: Array index out of bounds
show "$foo[2 1]"
^
fish: Array index out of bounds
show $foo[2 1]
^
fish: Invalid index value
echo "$foo[d]"
^
fish: Invalid index value
echo $foo[d]
^
fish: Array index out of bounds
echo ()[1]
^
fish: Invalid index value
echo ()[d]
^
fish: $) is not a valid variable in fish.
echo $$paren
^

View File

@@ -1,9 +1,9 @@
function: Illegal function name '-a'
fish: function -a arg1 arg2 name2 ; end
^
function: Illegal function name '--argument-names'
fish: function --argument-names arg1 arg2 name4 ; end
^
function: Unexpected positional argument 'abc'
fish: function name5 abc --argument-names def ; end
^
fish: function: Illegal function name '-a'
function -a arg1 arg2 name2 ; end
^
fish: function: Illegal function name '--argument-names'
function --argument-names arg1 arg2 name4 ; end
^
fish: function: Unexpected positional argument 'abc'
function name5 abc --argument-names def ; end
^

View File

@@ -1,3 +1,3 @@
No matches for wildcard '*ee*'. (Tip: empty matches are allowed in 'set', 'count', 'for'.)
fish: case *ee*
^
fish: No matches for wildcard '*ee*'. See `help expand`.
case *ee*
^

View File

@@ -1,7 +1,7 @@
emit: expected event name
Missing end to balance this begin
Missing end to balance this while loop
Missing end to balance this for loop
Missing end to balance this switch statement
Missing end to balance this function definition
Missing end to balance this if statement
- (line 1): Missing end to balance this begin
- (line 1): Missing end to balance this while loop
- (line 1): Missing end to balance this for loop
- (line 1): Missing end to balance this switch statement
- (line 1): Missing end to balance this function definition
- (line 1): Missing end to balance this if statement

View File

@@ -1,6 +1,6 @@
Variables may not be used as commands. In fish, please define a function or use 'eval $test'.
fish: exec $test
^
Variables may not be used as commands. In fish, please define a function or use 'eval "$test"'.
fish: exec "$test"
^
fish: Variables may not be used as commands. In fish, please define a function or use 'eval $test'.
exec $test
^
fish: Variables may not be used as commands. In fish, please define a function or use 'eval "$test"'.
exec "$test"
^