[READ-ONLY] Mirror of https://github.com/bombshell-dev/tab. shell autocompletions for javascript CLIs

fix: positional argument completion broken after flags (#111) master

* fix: positional argument completion broken after flags Three interacting bugs prevented positional argument completion when flags preceded the argument (e.g., 'mycli logs -f <TAB>'): 1. handlePositionalCompletion received raw args including flags, so its positional index calculation was inflated. Fix: call stripOptions() on previousArgs before counting positions. 2. parse() had an early return after detecting a boolean flag that skipped both handleCommandCompletion and handlePositionalCompletion. Fix: remove the early return to let control fall through. 3. The commander adapter marked ALL options as isBoolean=true, even value-taking ones like '--output <format>'. This caused stripOptions to not skip the value argument, further corrupting the positional index. Fix: detect '<' or '[' in flag syntax and register with a no-op handler to force isBoolean=false. Fixes #110 * style: revert cosmetic linter changes, keep only meaningful fix Remove import reordering, trailing comma additions, arrow function conversion, and test.each reformatting that were introduced by a linter not used by the project. Retains only the actual bug fix for positional completion after flags. * pnpm changeset --------- Co-authored-by: AmirSa12 <amirhosseinpr184@gmail.com>


+102 -56
5 changed files