From e1b7e1b51927517594e845ac9402abf6313976d2 Mon Sep 17 00:00:00 2001 From: Alex Hedges Date: Mon, 28 Aug 2023 16:57:04 -0400 Subject: [PATCH] Fix "grep: warning: stray \ before -" in `conda.bash` (#2768) According to the POSIX spec, an unescaped backslash not followed by an escapable character is undefined behavior, and it has become an error in GNU grep 3.8 (2022-09-02). --- pyenv.d/rehash/conda.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyenv.d/rehash/conda.bash b/pyenv.d/rehash/conda.bash index aaf88884..884cd4f2 100644 --- a/pyenv.d/rehash/conda.bash +++ b/pyenv.d/rehash/conda.bash @@ -35,7 +35,7 @@ make_shims() { deregister_conda_shims() { # adapted for Bash 4.x's associative array (#1749) - if declare -p registered_shims 2> /dev/null | grep -Eq '^(declare|typeset) \-A'; then + if declare -p registered_shims 2> /dev/null | grep -Eq '^(declare|typeset) -A'; then for shim in ${!registered_shims[*]}; do if conda_shim "${shim}" 1>&2; then unset registered_shims[${shim}]