oclif / plugin-autocomplete

autocomplete plugin for oclif
MIT License
83 stars 31 forks source link

feat: add `refresh-cache` hook #753

Closed cristiand391 closed 1 month ago

cristiand391 commented 1 month ago

DEPENDS ON: https://github.com/oclif/plugin-plugins/pull/932

This PR adds a new refresh-cache hook that runs autocomplete create to regenerate autocomplete functions after installing or uninstalling plugins.

QA

  1. checkout this PR and sf plugins link it
  2. checkout this PR: https://github.com/oclif/plugin-plugins/pull/932 and sf plugins link it
  3. enable completion: sf autocomplete and follow instructions
  4. type sf org a<TAB>, see it doesn't suggest org api
  5. install new plugin: sf plugins install @cristiand391/sf-plugin-api
  6. open a new terminal pane (for zsh to source completion again) and repeat step 4, it should suggest org api options
  7. uninstall plugin: sf plugins uninstall @cristiand391/sf-plugin-api
  8. repeat step 6, shouldn't see org api completion.

@W-12465784@

mdonnalley commented 1 month ago

QA

Followed steps in description

🟢 installing new plugin refreshes autocomplete 🟢 uninstalling new plugin refreshes autocomplete