Decline Completion
A module for the decline command line parser to enable bash and zsh autocomplete
Install / Use
npx skills add andimiller/decline-completionInstalls into whichever agent you are using.
README
decline-completion
A module for the decline command line parser to enable bash and zsh autocomplete
Caveats
This is currently oriented around supporting command line interfaces with a lot of subcommands, and will traverse the tree and expose options available on each subcommand for autocomplete.
If you heavily use shared configuration options which are not attached to subcommands, be aware these are currently not supported, but may be in a future release.
Usage
Add the dependency, currently available for JVM, JS and Native:
libraryDependencies ++= List(
"net.andimiller" %%% "decline-completion" % "0.0.2"
)
Add a new subcommand that can expose the output from this library:
lazy val othercommand = Opts.subcommand("???", "???").as(???)
lazy val completion = Opts.subcommand("completion", "output autocompletion scripts for common shells") {
val bash = Opts.subcommand("bash", "output autocompletion script for bash").as(
IO.println(
Completion.bashCompletion(cli)
)
)
val bash = Opts.subcommand("bash", "output autocompletion script for bash").as(
IO.println(
Completion.zshBashcompatCompletion(cli)
)
)
}
lazy val cli = Command("myprogram", "my program does things") {
othercommand orElse completion
}
Then call it on the command line to use it:
bash
myprogram completion bash > myprogram-completion.bash
source myprogram-completion.bash
zsh
myprogram completion zsh > myprogram-completion.zsh
source myprogram-completion.zsh
Related Skills
node-connect
385.5kDiagnose OpenClaw Android, iOS, or macOS node pairing, QR/setup code, route, auth, and connection failures.
blender-python-addon
40.5kBlender Python add-on rules for operators, panels, properties, registration, testing, and API-safe scripting
flutter-development-guidelines-cursorrules-prompt-file
40.5kCursor rules for Flutter development with MVVM architecture, Riverpod state management, Material widgets, and Dart style guidelines.
commit-push-pr
140.6kCommit, push, and open a PR
