Fix error when ZSH_VERSION is unset.

Merges https://github.com/espressif/esp-idf/pull/6587
This commit is contained in:
Markus Reiter 2021-02-21 06:09:30 +01:00 committed by Martin Gaňo
parent f7d7954bf4
commit d20a5c39da

View File

@ -141,7 +141,7 @@ idf_export_main() {
}
enable_autocomplete() {
if [ -n "$ZSH_VERSION" ]
if [ -n "${ZSH_VERSION-}" ]
then
autoload -Uz compinit && compinit -u
eval "$(env _IDF.PY_COMPLETE=source_zsh idf.py)" || echo "WARNING: Failed to load shell autocompletion!"