diff --git a/CHANGELOG.md b/CHANGELOG.md index 6680eaee..c0a0ab62 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ ### Fixed - Fixed `unrecognized modifier 'i'` that happened on tab-completion when using sub command aliases ([#500](https://github.com/ajalt/clikt/pull/500)) +- Make sure auto complete script works on zsh, fixing the error `complete:13: command not found: compdef` ([#499](https://github.com/ajalt/clikt/pull/499)) ## 4.2.2 ### Changed diff --git a/clikt/src/commonMain/kotlin/com/github/ajalt/clikt/completion/BashCompletionGenerator.kt b/clikt/src/commonMain/kotlin/com/github/ajalt/clikt/completion/BashCompletionGenerator.kt index cff27229..3034516c 100644 --- a/clikt/src/commonMain/kotlin/com/github/ajalt/clikt/completion/BashCompletionGenerator.kt +++ b/clikt/src/commonMain/kotlin/com/github/ajalt/clikt/completion/BashCompletionGenerator.kt @@ -38,7 +38,9 @@ internal object BashCompletionGenerator { if (zsh) { append( """ - |autoload bashcompinit + |autoload -Uz compinit + |compinit + |autoload -Uz bashcompinit |bashcompinit | |