mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-04 12:41:16 -03:00
function: Check if --argument-names gets a valid variable name
These were accepted but then ineffective because the only way these are used is to set a variable.
This commit is contained in:
@@ -167,4 +167,10 @@ function foo -p bar; end
|
||||
# CHECKERR: function foo -p bar; end
|
||||
# CHECKERR: ^~~~~~~~~~~~~~~~~~~^
|
||||
|
||||
function foo --argument-names "banana pajama"; end
|
||||
# CHECKERR: {{.*}}function.fish (line {{\d+}}): function: banana pajama: invalid variable name. See `help identifiers`
|
||||
# CHECKERR: function foo --argument-names "banana pajama"; end
|
||||
# CHECKERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
|
||||
|
||||
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user