gli icon indicating copy to clipboard operation
gli copied to clipboard

GLI does not respect the trailing `--` to stop command line parsing

Open davetron5000 opened this issue 4 years ago • 3 comments

davetron5000 avatar Feb 14 '21 13:02 davetron5000

Curious as to whether you are planning to implement this or if you have any guidance on where best to take a look at adding this. Right now it's a bit of a blocker for my current use case... Thanks!

peregrinator avatar Jul 19 '21 17:07 peregrinator

Hey, I hadn't thought much about it, but wanted to record it as it was not a bug I expected to exist. Under the covers, GLI uses Ruby's OptionParser which should support this use case, so something must be screwing that up before it gets called. GliOptionParser is the root class that initiates the parsing, but it's kindof a bear

davetron5000 avatar Jul 19 '21 18:07 davetron5000

I think I had another bug in my code when I first attempted to use the -- as part of my command. I fixed another bug and I believe that I also had arguments set in :strict mode which may also have been part of the reason it wasn't working for me.

Using -- to pass additional arguments to the command appears to be working for me as expected at this point so I think this issue could be closed. It may be worth documenting the use of -- though?

peregrinator avatar Jul 20 '21 01:07 peregrinator