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

✨ Setup Autocomplete #341

Merged
merged 30 commits into from
Jun 6, 2024
Merged

✨ Setup Autocomplete #341

merged 30 commits into from
Jun 6, 2024

Conversation

mayankpatibandla
Copy link
Member

@mayankpatibandla mayankpatibandla commented Apr 1, 2024

Summary:

  • Adds a command to setup autocomplete for bash, zsh, fish, pwsh, and powershell
  • Adds a custom PowerShell script to register an argument completer

Example:

pros setup-autocomplete bash

Motivation:

Since we upgraded to click 8 in #307 it is possible to use click's shell completion feature. This will allow users to quickly select commands in the supported shells.

References (optional):

Closes #138

Test Plan:

  • bash (Ubuntu WSL)
  • zsh (Ubuntu WSL)
  • fish (Ubuntu WSL)
  • pwsh (Ubuntu WSL)
  • bash (Windows)
  • zsh (Windows)
    • Autocomplete doesn't work
  • pwsh (Windows)
  • powershell (Windows)
  • bash (macOS)
  • zsh (macOS)
  • fish (macOS)
  • pwsh (macOS)
  1. Run pros setup-autocomplete {shell}
  2. Start typing a pros command, then press your autocomplete key (default should be double press TAB)
  3. Ensure a completion is shown, example below for fish shell on linux
    image

@mayankpatibandla mayankpatibandla self-assigned this Apr 1, 2024
@noam987
Copy link
Contributor

noam987 commented Jun 5, 2024

Can we get some more specific testing instructions (like a set of example commands and what auto complete should fill in)?

@mayankpatibandla
Copy link
Member Author

mayankpatibandla commented Jun 5, 2024

Can we get some more specific testing instructions (like a set of example commands and what auto complete should fill in)?

  1. Run pros setup-autocomplete {shell}
  2. Start typing a pros command, then press your autocomplete key (default should be double press TAB)
  3. Ensure a completion is shown, example below for fish shell on linux
    image

@mayankpatibandla mayankpatibandla merged commit 81c6654 into develop Jun 6, 2024
10 checks passed
@mayankpatibandla mayankpatibandla deleted the setup-autocomplete branch June 6, 2024 04:59
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.

Add Tab Completion
3 participants