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

shell completion #803

Open
Freed-Wu opened this issue Jan 11, 2023 · 0 comments
Open

shell completion #803

Freed-Wu opened this issue Jan 11, 2023 · 0 comments
Assignees

Comments

@Freed-Wu
Copy link

Is your feature request related to a problem? Please describe.

Is wakatime/wakatime-cli possible to provide tab completion for common shells like

❯ wakatime --<TAB>
option
--alternate-branch                 Optional alternate branch name. Auto-detected branch takes priority.
--alternate-language               Optional alternate language name. Auto-detected language takes priority.
--alternate-project                Optional alternate project name. Auto-detected project takes priority.
--api-url                          API base url used when sending heartbeats and fetching code stats. Defaults to https-//api.wakatime.com/api/v1/.
--category                         Category of this heartbeat activity. Can be "coding", "building", "indexing", "debugging", "running tests", "writing tests", "manual testing", "code reviewing", "browsing", or "designing". Defaults to "coding".
--config                           Optional config file. Defaults to '~/.wakatime.cfg'.
--config-read                      Prints value for the given config key, then exits.
--config-section                   Optional config section when reading or writing a config key. Defaults to (settings). (default "settings")
--config-write                     Writes value to a config key, then exits. Expects two arguments, key and value. (default ())
--cursorpos                        Optional cursor position in the current file.
--disable-offline                  Disables offline time logging instead of queuing logged time.
--entity                           Absolute path to file for the heartbeat. Can also be a url, domain or app when --entity-type is not file.
...

Describe the solution you'd like to see

https://jmtirado.net/shell-completion-with-cobra-and-go/

Describe alternatives you've considered

https://github.com/cli/cli/blob/cf4b73ff958b272cf3c9c0cf9351459f76b793a0/pkg/cmd/completion/completion.go

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants