enable autocompletion for command idf.py

This commit is contained in:
martin.gano
2020-11-02 14:11:14 +01:00
parent d7b125a87b
commit 346b002d9a
11 changed files with 110 additions and 21 deletions

View File

@@ -136,7 +136,19 @@ idf_export_main() {
echo ""
}
enable_autocomplete() {
if [ -n "$ZSH_VERSION" ]
then
autoload -Uz compinit && compinit -u
eval "$(env _IDF.PY_COMPLETE=source_zsh idf.py)"
else
eval "$(env _IDF.PY_COMPLETE=source_bash idf.py)"
fi
}
idf_export_main
enable_autocomplete
unset realpath_int
unset idf_export_main