diff --git a/.github/cspell.json b/.github/cspell.json index dac7f94..322c4ae 100644 --- a/.github/cspell.json +++ b/.github/cspell.json @@ -19,6 +19,8 @@ "words": [ "subcommand", "inverseflag", - "trueflag" + "trueflag", + "autoload", + "compinit" ] } diff --git a/README.md b/README.md index ae9913a..2e43487 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,9 @@ For an overview of how this package works, check out the [documentation][docs_li --- -### ⚠️ Using analytics +## Troubleshooting 🧠🔨 + +### Tab completion is taking too long Handling completion requests should be straightforward. @@ -81,6 +83,18 @@ Future runCommand(ArgResults topLevelResults) async { // ... analytics and other unrelated stuff ``` +### Tab completion is not working on my zsh terminal + +If you are not using any zsh framework such as [Oh My Zsh][oh_my_zsh], you have to start the completion system manually. + +Add the following lines to your `~/.zshrc` file: + +```zsh +# Add this to the start of your zsh starter file (~/.zshrc) +autoload -Uz compinit +compinit +``` + [dart_install_link]: https://dart.dev/get-dart [license_badge]: https://img.shields.io/badge/license-MIT-blue.svg [license_link]: https://opensource.org/licenses/MIT @@ -99,3 +113,4 @@ Future runCommand(ArgResults topLevelResults) async { [coverage_badge]: https://raw.githubusercontent.com/VeryGoodOpenSource/cli_completion/main/coverage_badge.svg [ci_badge]: https://github.com/VeryGoodOpenSource/cli_completion/workflows/ci/badge.svg [ci_link]: https://github.com/VeryGoodOpenSource/cli_completion/actions +[oh_my_zsh]: https://ohmyz.sh/