Fix options after --argument-names to function (#6188)

This stops reading argument names after another option appears. It does not break any previous uses and in fact fixes uses like

```fish
function foo --argument-names bar --description baz
```

* `function` command handles options after argument names (Fixes #6186)

* Removed unneccesary test
This commit is contained in:
Aaron Miller
2019-10-10 12:09:26 -04:00
committed by Fabian Homborg
parent 3d1e9423c2
commit 15ed682bfa
2 changed files with 15 additions and 12 deletions

View File

@@ -2,13 +2,3 @@
function t --argument-names a b c
echo t
end
function t2 --argument-names a b c --no-scope-shadowing
echo t2
end
#CHECKERR: {{.*/?}}function.fish (line {{\d+}}): function: Variable name '--no-scope-shadowing' is not valid. See `help identifiers`.
#CHECKERR: function t2 --argument-names a b c --no-scope-shadowing
#CHECKERR: ^
functions -q t2 && echo exists || echo does not exist
#CHECK: does not exist