From 4007c0d062b49cbce911937c8a9bedadd49e5ec8 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Mon, 26 Oct 2026 11:11:53 -0700 Subject: [PATCH] [Tests] `bash_completion`: don't let zsh's `compinit` wait for an answer On runners where zsh considers a completion directory insecure, `compinit` asks whether to use it, and on the test's terminal waited for an answer forever, which hung every Ubuntu `fast` job. The test now sets `ZSH_DISABLE_COMPFIX`, which `bash_completion` already honors, and gives zsh no stdin. --- ...on lists alias and version names without expanding them | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/fast/Unit tests/bash_completion lists alias and version names without expanding them b/test/fast/Unit tests/bash_completion lists alias and version names without expanding them index cd8a65b3..4cf6cfe9 100755 --- a/test/fast/Unit tests/bash_completion lists alias and version names without expanding them +++ b/test/fast/Unit tests/bash_completion lists alias and version names without expanding them @@ -44,15 +44,16 @@ complete_nvm() { ' bash "${NVM_SH}" "${BASH_COMPLETION}" "$@" ;; zsh) - # bashcompinit runs `complete -F` functions from its `compgen`, under `emulate -L sh` - NVM_DIR="${TEST_DIR}/nvm" zsh -f -c ' + # bashcompinit runs `complete -F` functions from its `compgen`, under `emulate -L sh`; + # without ZSH_DISABLE_COMPFIX, `compinit` asks about insecure completion directories, and waits + ZSH_DISABLE_COMPFIX=true NVM_DIR="${TEST_DIR}/nvm" zsh -f -c ' \. "${1}" --no-use \. "${2}" shift 2 COMP_WORDS=("${@}") COMP_CWORD=$(($# - 1)) compgen -F __nvm -- "${@[-1]}" - ' zsh "${NVM_SH}" "${BASH_COMPLETION}" "$@" + ' zsh "${NVM_SH}" "${BASH_COMPLETION}" "$@" < /dev/null ;; esac ) | LC_ALL=C sort