diff --git a/docs/en/api-guides/build-system.rst b/docs/en/api-guides/build-system.rst index c317f121bf..9746213b0d 100644 --- a/docs/en/api-guides/build-system.rst +++ b/docs/en/api-guides/build-system.rst @@ -83,9 +83,9 @@ Multiple ``idf.py`` commands can be combined into one. For example, ``idf.py -p For commands that are not known to ``idf.py`` an attempt to execute them as a build system target will be made. -The command ``idf.py`` supports `shell autocompletion `_ for bash, zsh and fish shells. +The command ``idf.py`` supports `shell autocompletion `_ for bash, zsh and fish shells. -In order to make `shell autocompletion `_ supported, please make sure you have at least Python 3.5 and `click `_ 7.1 or newer (:ref:`see also `). +In order to make `shell autocompletion `_ supported, please make sure you have at least Python 3.5 and `click `_ 7.1 or newer (:ref:`see also `). To enable autocompletion for ``idf.py`` use the ``export`` command (:ref:`see this `). Autocompletion is initiated by pressing the TAB key. Type "idf.py -" and press the TAB key to autocomplete options. diff --git a/docs/zh_CN/api-guides/build-system.rst b/docs/zh_CN/api-guides/build-system.rst index 8c97f8bc4e..a9c9d4c646 100644 --- a/docs/zh_CN/api-guides/build-system.rst +++ b/docs/zh_CN/api-guides/build-system.rst @@ -83,9 +83,9 @@ idf.py 对于 ``idf.py`` 不知道的指令,``idf.py`` 会尝试将其作为构建系统的目标来执行。 -``idf.py`` 命令支持 bash、 zsh 以及 fish shell 的 `自动补全 `_。 +``idf.py`` 命令支持 bash、 zsh 以及 fish shell 的 `自动补全 `_。 -要实现实现 shell `自动补全 `_,请先确保您安装了 Python 3.5 以及 `click `_ 7.1 及以上版本(:ref:`请参考这里 `)。 +要实现实现 shell `自动补全 `_,请先确保您安装了 Python 3.5 以及 `click `_ 7.1 及以上版本(:ref:`请参考这里 `)。 使用 ``export`` 命令来启用 ``idf.py`` 的自动补全功能(:ref:`请参考这里 `)。按 TAB 键可实现自动补全。输入 “idf.py -” 后按 TAB 键可自动补全选项。 diff --git a/export.sh b/export.sh index ddcced1c24..b8e8d0dbdf 100644 --- a/export.sh +++ b/export.sh @@ -153,10 +153,10 @@ enable_autocomplete() { 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!" + eval "$(env _IDF.PY_COMPLETE=$SOURCE_ZSH idf.py)" || echo "WARNING: Failed to load shell autocompletion for zsh version: $ZSH_VERSION!" elif [ -n "${BASH_SOURCE-}" ] then - eval "$(env _IDF.PY_COMPLETE=$SOURCE_BASH idf.py)" || echo "WARNING: Failed to load shell autocompletion!" + eval "$(env _IDF.PY_COMPLETE=$SOURCE_BASH idf.py)" || echo "WARNING: Failed to load shell autocompletion for bash version: $BASH_VERSION!" fi unset SOURCE_ZSH