Closed atareshawty closed 5 years ago
Nice catch on the strict arg handling. Your overall approach looks good.
Thanks! This is ready for review then 😄
OK, cool. A couple of questions just to make sure I'm following it:
Looks like the bug was that the autocomplete configuration was not properly being passed down when recursively finding commands, so the system defaulted to the wrong thing?
Correct.
Did you check this against your app to make sure it does work?
I just checked again and it does fix the issue. I'll post a branch in the reproduction repo I linked in #287
Edit: I clicked the button before typing my answer to your second question😅
Here is an example when using the patched version: https://github.com/Root-App/gli-auto-complete/tree/verify-fix. I've updated the README to include how the output changes with the patch
OK, awesome. I will merge and release here in a few…
Released just now as 2.18.1
Thanks again for the fix!
No problem! Thank you for maintaining this great gem
In response to #287
The first commit adds tests to demonstrate what (I think) the expected behavior should be:
error: Too many arguments for command
I'm starting the PR as a draft because I'm not 100% sure if I'm correctly stating the expected behavior.
The next commit fixes the issue and makes the tests pass 🚀