Commits
Co-authored-by: bombshell-bot[bot] <187071675+bombshell-bot[bot]@users.noreply.github.com>
* Use Commander built-in support for determining option flags and types, visible options, and visible commands.
* Add automatic support for Commander option choices
* changeset
---------
Co-authored-by: AmirSa12 <amirhosseinpr184@gmail.com>
* feat(commander): support positional argument completions
* address john's comment
* add changeset
---------
Co-authored-by: bombshell-bot[bot] <187071675+bombshell-bot[bot]@users.noreply.github.com>
* Add root command options and custom completions expected by tests
* Add Commander dev command options and custom completions expected by tests
* Update comment
* Rework `complete` command to allow separate complete and completion commands, and remove need to monkeypatch parse+parseAsync
* Consistently capitalise descriptions in Commander framework
* Fix usage for hidden stand-alone complete command
* add changeset
* Pass all `complete` args into delegated command so it can warn about bogus extra aguments after shell
* Add custom completion name to README, and possible usage error to complete.
* Tweak error text
* Tidy comment
---------
Co-authored-by: Amir <amir@Amirs-MacBook-Air.local>
* Modify example commander file to match others and what testing expects. Enable cli tests on Commander too.
* Reviewing Commander tests without refactoring anything yet
* Clarify comment
* Remove temporary comments/changes.
* Reduce changes, restore non-functional code
* chore(ci): retrigger publish
* chore(ci): retrigger publish
* fix: intercept parseAsync() commander
* add changeset
Co-authored-by: bombshell-bot[bot] <187071675+bombshell-bot[bot]@users.noreply.github.com>
* chore(ci): retrigger publish workflow
* 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>
* build: update tsdown to v0.20.3
* Create poor-plants-hug.md
* prettier
---------
Co-authored-by: AmirSa12 <amirhosseinpr184@gmail.com>
Co-authored-by: bombshell-bot[bot] <187071675+bombshell-bot[bot]@users.noreply.github.com>
* fix: update fish script based on cobra
* fix: lint
* chore: add changeset
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* init
* fallback
* update
* revert
* test
* add changeset
* use pwsh stop parsing operator
* fix: cli detect pwsh
* remove operator
* add debug log
* exclude pwsh from having -- required
* update
* add -- manually
* add -- manually
* fix partial command detection
* test empty string
* i bet this will work
* test
* test
* separator
* add changeset
* prettier
* update
* pwsh.ts
* rm log
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* global install tab
* readme
* changeset
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* fix: npm exec
* prettier
* changeset
* fix: use npx for portable completion scripts
* use npm user agent
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* update
* change gif
* update readme
* update readme
* update
* treat options well
* update
* update
* Rework `complete` command to allow separate complete and completion commands, and remove need to monkeypatch parse+parseAsync
* Consistently capitalise descriptions in Commander framework
* Fix usage for hidden stand-alone complete command
* add changeset
* Pass all `complete` args into delegated command so it can warn about bogus extra aguments after shell
* Add custom completion name to README, and possible usage error to complete.
* Tweak error text
* Tidy comment
---------
Co-authored-by: Amir <amir@Amirs-MacBook-Air.local>
Co-authored-by: bombshell-bot[bot] <187071675+bombshell-bot[bot]@users.noreply.github.com>
* 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>
Co-authored-by: bombshell-bot[bot] <187071675+bombshell-bot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* use pwsh stop parsing operator
* fix: cli detect pwsh
* remove operator
* add debug log
* exclude pwsh from having -- required
* update
* add -- manually
* add -- manually
* fix partial command detection
* test empty string
* i bet this will work
* test
* test
* separator
* add changeset
* prettier
* update
* pwsh.ts
* rm log
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>