Skip to content

feat: add bash shell completions#18

Merged
renezander030 merged 1 commit into
renezander030:masterfrom
adityabhatkar23:feat/bash-completions
May 31, 2026
Merged

feat: add bash shell completions#18
renezander030 merged 1 commit into
renezander030:masterfrom
adityabhatkar23:feat/bash-completions

Conversation

@adityabhatkar23
Copy link
Copy Markdown
Contributor

Summary

Adds a new capcut completions bash command that generates a Bash completion script.

This implements the Bash portion of the shell completions issue.

Features

  • Completes CLI subcommands

  • Completes global flags:

    • --jianying
    • --human
    • --quiet
    • --version

Notes

The issue discussion mentioned leaving --version out until the version flag PR was merged. Since that PR has now been merged into master, the completion script includes --version.

Testing

  • Added completion script generation tests
  • Verified Bash completion locally
  • All tests pass

Documentation

  • Added a Shell completions subsection under Commands
  • Added Bash completions to the feature checklist

Example

capcut completions bash >> ~/.bashrc

@adityabhatkar23
Copy link
Copy Markdown
Contributor Author

@renezander030 Thanks for the review!

I started with Bash as suggested in the issue. If this approach looks good and gets merged, I'd be happy to follow up with separate PRs for Zsh and Fish completions as well, keeping each shell implementation isolated and easy to review.

@renezander030 renezander030 merged commit b579147 into renezander030:master May 31, 2026
4 checks passed
@renezander030
Copy link
Copy Markdown
Owner

Hi Aditya, merged — thanks for the clean contribution. CI was green and the test coverage is exactly right.

Yes please on the separate Zsh and Fish PRs; one per shell is the right call. I've left issue #8 open to track those two.

One small thing for a follow-up (not blocking anything): COMMANDS is a hand-maintained list, so it can drift as new commands land. If you're up for it, a test asserting every entry actually dispatches would keep it honest.

Rene

renezander030 added a commit that referenced this pull request Jun 3, 2026
The pre-commit hook ran test:fast, which skips the build step, so tests
ran against a stale dist/ — green-or-red on code that wasn't being
committed (e.g. a stale templates command after #18-#20). The comment
already claimed "build first" but nothing did. Switch to `npm test`,
which rebuilds dist/ first.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
renezander030 added a commit that referenced this pull request Jun 3, 2026
Roll up the unreleased work into 0.8.0 and backfill the missing 0.7.0
changelog section.

0.8.0 — global --dry-run (#15), restore (#16), shell completions
(#18-20), track-order fix (#21), pre-commit dist rebuild (#23), docs +
CONTRIBUTING.

Adds CONTRIBUTING.md.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants