If a -- argument is passed, from then on only arguments should be parsed. This is already handled correctly in most places, but autocompleting did not honour this yet.
go run main.go --completion-bash an-argument --flag1 -- --
We expect not to get a suggestion for any of the flags of the command because the -- argument signals that all arguments were provided. However, on the current master, the result is:
$ go run main.go --completion-bash an-argument --flag1 -- --
--help
--flag1
--flag2
If there is a more elegant solution to achieve this (without a big refactor), I'm happy to hear it.
If a
--
argument is passed, from then on only arguments should be parsed. This is already handled correctly in most places, but autocompleting did not honour this yet.Example
If this following command is executed:
We expect not to get a suggestion for any of the flags of the command because the
--
argument signals that all arguments were provided. However, on the currentmaster
, the result is:If there is a more elegant solution to achieve this (without a big refactor), I'm happy to hear it.