Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cli): Implement completion for flags and arguments #106

Merged
merged 1 commit into from
Jan 21, 2023

Conversation

irvinlim
Copy link
Member

Supports auto-completion of arguments and flags for all commands:

completion

  • -n/--namespace: Autocompletes based on list of namespaces.
  • -o/--output: Autocompletes list of output formats.
  • Autocompletes Job/JobConfig names.

Side note: The above GIF was generated with https://github.com/charmbracelet/vhs

@irvinlim irvinlim added kind/feature Categorizes issue or PR as related to a new, well-defined and agreed-upon feature. area/furiko-cli Related to the command-line interface (CLI) utility. labels Dec 14, 2022
@irvinlim irvinlim self-assigned this Dec 14, 2022
@codecov
Copy link

codecov bot commented Dec 14, 2022

Codecov Report

Base: 64.57% // Head: 64.22% // Decreases project coverage by -0.35% ⚠️

Coverage data is based on head (2efdaf8) compared to base (48cc689).
Patch coverage: 47.36% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #106      +/-   ##
==========================================
- Coverage   64.57%   64.22%   -0.36%     
==========================================
  Files         205      207       +2     
  Lines       10963    11079     +116     
==========================================
+ Hits         7079     7115      +36     
- Misses       3505     3574      +69     
- Partials      379      390      +11     
Impacted Files Coverage Δ
apis/execution/v1alpha1/jobconfig_types.go 100.00% <ø> (ø)
pkg/cli/cmd/completion.go 22.22% <22.22%> (ø)
pkg/cli/cmd/common.go 44.59% <25.00%> (-4.62%) ⬇️
pkg/cli/cmd/completion_helper.go 25.00% <25.00%> (ø)
pkg/cli/cmd/cmd.go 86.95% <40.00%> (-5.73%) ⬇️
pkg/cli/cmd/cmd_get.go 84.21% <40.00%> (-15.79%) ⬇️
pkg/cli/cmd/cmd_list.go 84.21% <40.00%> (-15.79%) ⬇️
pkg/cli/cmd/cmd_list_job.go 80.00% <40.00%> (-2.11%) ⬇️
pkg/cli/cmd/cmd_run.go 75.56% <70.00%> (-0.91%) ⬇️
pkg/cli/cmd/cmd_disable.go 73.68% <100.00%> (+0.46%) ⬆️
... and 4 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@irvinlim irvinlim requested a review from qingyuanz December 14, 2022 19:31
@irvinlim irvinlim force-pushed the irvinlim/feat/cli-completion branch 2 times, most recently from 75f390a to 7a2a301 Compare December 15, 2022 17:16
@irvinlim irvinlim force-pushed the irvinlim/feat/cli-completion branch from 7a2a301 to 2efdaf8 Compare December 15, 2022 19:00
@irvinlim irvinlim merged commit 7cbcd4f into main Jan 21, 2023
@irvinlim irvinlim deleted the irvinlim/feat/cli-completion branch January 21, 2023 05:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/furiko-cli Related to the command-line interface (CLI) utility. kind/feature Categorizes issue or PR as related to a new, well-defined and agreed-upon feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant