basti-app / basti

✨ Securely connect to RDS, Elasticache, and other AWS resources in VPCs with no idle cost
https://www.basti.app
MIT License
351 stars 18 forks source link

fix: remove `.recommendCommands()` to fix zsh completion #98

Closed chenrui333 closed 6 months ago

chenrui333 commented 7 months ago

Proposed Changes

With this change, I can see the zsh completion output correctly

$ SHELL=zsh basti completion zsh
#compdef basti
###-begin-basti-completions-###
#
# yargs command completion script
#
# Installation: /opt/homebrew/bin/basti completion >> ~/.zshrc
#    or /opt/homebrew/bin/basti completion >> ~/.zprofile on OSX.
#
_basti_yargs_completions()
{
  local reply
  local si=$IFS
  IFS=$'
' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" /opt/homebrew/bin/basti --get-yargs-completions "${words[@]}"))
  IFS=$si
  _describe 'values' reply
}
compdef _basti_yargs_completions basti
###-end-basti-completions-###

Related Issues/PRs

fixes #96

relates to https://github.com/Homebrew/homebrew-core/pull/168333

Checklist