use variable assignments on commandline in completions

Fixes #6507

To do: If a variable assignment uses a command substitution that errors,
the error is printed, but without a proper location.
This commit is contained in:
Johannes Altmanninger
2020-01-17 14:14:06 +01:00
parent c513724d7b
commit 05ddda9155
2 changed files with 27 additions and 1 deletions

View File

@@ -91,3 +91,7 @@ eval ': | a=b'
# CHECKERR: {{.*}}: Unsupported use of '='. In fish, please use 'set a b'.
eval 'not a=b'
# CHECKERR: {{.*}}: Unsupported use of '='. In fish, please use 'set a b'.
complete -c foo -xa '$a'
a=b complete -C'foo '
#CHECK: b