Skip to content

added dynamic completion

Kerri Miller requested to merge github/fork/rsteube/carapace into trunk

Created by: rsteube

Description Added dynamic completion using carapace.

Related Issue Resolves #724 (closed)

How Has This Been Tested? Testing is still limited and i expect some small issues regaring the values being completed (e.g it seems the repo clone command currently ignores the host prefix and tries to use gitlab.com). There might also be some small issues regarding different environments (os/shell) regarding carapace itself - works fine in tests and there haven't been any issues with lab so far though. Personally using elvish on linux. Does not affect current completion provided by cobra itself, so these can be used in parallel.

Screenshots (if appropriate): asciicast

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation
  • Chore (Related to CI or Packaging to platforms)

Usage

#bash
source <(glab _carapace)

# elvish
eval (glab _carapace|slurp)

# fish
glab _carapace | source

# oil
source <(glab _carapace)

# powershell
Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete
glab _carapace | Out-String | Invoke-Expression

# xonsh
COMPLETIONS_CONFIRM=True
exec($(glab _carapace))

# zsh
source <(glab _carapace)

Merge request reports