mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-07 10:01:14 -03:00
Allow foo=bar global variable assignments
override fixes
This commit is contained in:
@@ -403,8 +403,7 @@ function hello_continuations
|
||||
|
||||
echo "\
|
||||
a=1 \\
|
||||
a=2 \\
|
||||
echo" | $fish_indent --check
|
||||
a=2 echo" | $fish_indent --check # FIXME
|
||||
echo $status #CHECK: 0
|
||||
|
||||
echo "\
|
||||
@@ -497,12 +496,12 @@ echo $status #CHECK: 0
|
||||
echo 'PATH={$PATH[echo " "' | $fish_indent --ansi
|
||||
# CHECK: PATH={$PATH[echo " "
|
||||
|
||||
echo a\> | $fish_indent
|
||||
echo a \> | $fish_indent # TODO(posix_mode)
|
||||
# CHECK: a >
|
||||
|
||||
echo a\<\) | $fish_indent
|
||||
# CHECK: a < )
|
||||
echo b\|\{ | $fish_indent
|
||||
echo b\|\{ | $fish_indent # TODO(posix_mode)
|
||||
# CHECK: b | {
|
||||
|
||||
echo "\'\\\\\x00\'" | string unescape | $fish_indent | string escape
|
||||
|
||||
@@ -101,10 +101,10 @@ $fish --no-config .
|
||||
# CHECKERR: error: Unable to read input file: Is a directory
|
||||
# CHECKERR: warning: Error while reading file .
|
||||
|
||||
$fish --no-config -c 'echo notprinted; echo foo; a=b'
|
||||
# CHECKERR: fish: Unsupported use of '='. In fish, please use 'set a b'.
|
||||
# CHECKERR: echo notprinted; echo foo; a=b
|
||||
# CHECKERR: ^~^
|
||||
$fish --no-config -c 'echo notprinted; echo foo; echo $%'
|
||||
# CHECKERR: fish: $% is not a valid variable in fish.
|
||||
# CHECKERR: echo notprinted; echo foo; echo $%
|
||||
# CHECKERR: ^
|
||||
|
||||
$fish --no-config -c 'echo notprinted | and true'
|
||||
# CHECKERR: fish: The 'and' command can not be used in a pipeline
|
||||
|
||||
@@ -85,18 +85,19 @@ complete -C'a=b envxalias '
|
||||
# CHECK: arg
|
||||
|
||||
# Eval invalid grammar to allow fish to parse this file
|
||||
eval 'a=(echo b)'
|
||||
# CHECKERR: {{.*}}: Unsupported use of '='. In fish, please use 'set a (echo b)'.
|
||||
# CHECKERR: a=(echo b)
|
||||
# CHECKERR: ^~~~~~~~~^
|
||||
eval ': | a=b'
|
||||
# CHECKERR: {{.*}}: Unsupported use of '='. In fish, please use 'set a b'.
|
||||
# CHECKERR: : | a=b
|
||||
# CHECKERR: ^~^
|
||||
eval 'not a=b'
|
||||
# CHECKERR: {{.*}}: Unsupported use of '='. In fish, please use 'set a b'.
|
||||
# CHECKERR: not a=b
|
||||
# CHECKERR: ^~^
|
||||
a=(echo b1)
|
||||
echo a is $a
|
||||
# CHECK: a is b1
|
||||
|
||||
# FIXME
|
||||
# : | a=b2
|
||||
# echo a is $a
|
||||
# # CHECK: echo a is b2
|
||||
|
||||
# TODO(posix_mode)
|
||||
# not a=b3
|
||||
# echo a is $a
|
||||
# # CHECK: echo a is b3
|
||||
|
||||
complete -c foo -xa '$a'
|
||||
a=b complete -C'foo '
|
||||
|
||||
Reference in New Issue
Block a user