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

Add autocomplete for commands and flags #154

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Computroniks
Copy link
Contributor

Summary

Support for autocompletion of commands has been added through the use of the @oclif/plugin-autocomplete package. This supports generating auto completion scripts for zsh, bash and powershell by using the command apimetrics autocomplete.

Type

  • Feature
  • Bug Fix
  • Breaking Change

Usage

Display autocomplete installation instructions.

USAGE
  $ apimetrics autocomplete [SHELL] [-r]

ARGUMENTS
  SHELL  (zsh|bash|powershell) Shell type

FLAGS
  -r, --refresh-cache  Refresh cache (ignores displaying instructions)

DESCRIPTION
  Display autocomplete installation instructions.

EXAMPLES
  $ apimetrics autocomplete

  $ apimetrics autocomplete bash

  $ apimetrics autocomplete zsh

  $ apimetrics autocomplete powershell

  $ apimetrics autocomplete --refresh-cache

Screenshots

image
Generating the autocomplete script for the users shell

image
Using <tab> <tab> to generate autocomplete options for commands

image
Using <tab> <tab> to generate autocomplete options for flags

Self Review

  • I have reviewed my code to ensure there are no artifacts left over from development
  • I have tested my code to ensure it functions as intended

Support for autocompletion of commands has been added through the use of the `@oclif/plugin-autocomplete` package. This supports generating auto completion scripts for zsh, bash and powershell by using the command `apimetrics autocomplete`.

Signed-off-by: Matthew Nickson <[email protected]>
@Computroniks Computroniks added this to the v0.4.0 milestone Jan 5, 2024
@Computroniks Computroniks added the feature New feature or request label Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants