generated from boneskull/boneskull-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
Add support for generating shell completion scripts (bash, zsh, fish) similar to yargs' .completion() feature.
Use Case
When migrating from yargs to bargs, shell completion is one of the features that doesn't have a direct equivalent. Power users who rely on tab completion for CLI tools would benefit from this.
Proposed API
Something like:
const cli = bargs('mytool')
.command('build', buildParser, buildHandler)
.command('test', testParser, testHandler);
// Generate completion script
cli.completionScript('bash'); // or 'zsh', 'fish'Or perhaps a built-in completion command that outputs the appropriate script:
mytool completion bash >> ~/.bashrc
mytool completion zsh >> ~/.zshrcPriority
Low - This is a nice-to-have for power users, not a blocker for CLI functionality.
Feature request from migrating modestbench from yargs to bargs 🎸
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request