Temporarily set LANG to en code to avoid RuntimeError

Closes https://github.com/espressif/esp-idf/issues/7173
This commit is contained in:
Martin Gaňo 2021-06-22 11:01:14 +02:00
parent b67e388281
commit beba6f954c
3 changed files with 6 additions and 6 deletions

View File

@ -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 <https://click.palletsprojects.com/bashcomplete/>`_ for bash, zsh and fish shells.
The command ``idf.py`` supports `shell autocompletion <https://click.palletsprojects.com/shell-completion/>`_ for bash, zsh and fish shells.
In order to make `shell autocompletion <https://click.palletsprojects.com/bashcomplete/>`_ supported, please make sure you have at least Python 3.5 and `click <https://click.palletsprojects.com/>`_ 7.1 or newer (:ref:`see also <get-started-get-prerequisites>`).
In order to make `shell autocompletion <https://click.palletsprojects.com/shell-completion/>`_ supported, please make sure you have at least Python 3.5 and `click <https://click.palletsprojects.com/>`_ 7.1 or newer (:ref:`see also <get-started-get-prerequisites>`).
To enable autocompletion for ``idf.py`` use the ``export`` command (:ref:`see this <get-started-export>`). Autocompletion is initiated by pressing the TAB key. Type "idf.py -" and press the TAB key to autocomplete options.

View File

@ -83,9 +83,9 @@ idf.py
对于 ``idf.py`` 不知道的指令,``idf.py`` 会尝试将其作为构建系统的目标来执行。
``idf.py`` 命令支持 bash, zsh 以及 fish shell 的 `自动补全 <https://click.palletsprojects.com/bashcomplete/>`_
``idf.py`` 命令支持 bash, zsh 以及 fish shell 的 `自动补全 <https://click.palletsprojects.com/shell-completion/>`_
要实现实现 shell `自动补全 <https://click.palletsprojects.com/bashcomplete/>`_,请先确保您安装了 Python 3.5 以及 `click <https://click.palletsprojects.com/>`_ 7.1 及以上版本(:ref:`请参考这里 <get-started-get-prerequisites>`)。
要实现实现 shell `自动补全 <https://click.palletsprojects.com/shell-completion/>`_,请先确保您安装了 Python 3.5 以及 `click <https://click.palletsprojects.com/>`_ 7.1 及以上版本(:ref:`请参考这里 <get-started-get-prerequisites>`)。
使用 ``export`` 命令来启用 ``idf.py`` 的自动补全功能(:ref:`请参考这里 <get-started-export>`)。按 TAB 键可实现自动补全。输入 “idf.py -” 后按 TAB 键可自动补全选项。

View File

@ -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 LANG=en _IDF.PY_COMPLETE=$SOURCE_BASH idf.py)" || echo "WARNING: Failed to load shell autocompletion for bash version: $BASH_VERSION!"
fi
unset SOURCE_ZSH