From 60bdc0d59cfcb3b878a3bbb4cd2a8618a4aabc0a Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Thu, 3 Feb 2022 12:46:47 +0100 Subject: [PATCH] improve autompletion shell scripts (#1440) --- libmamba/data/mamba_completion.posix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libmamba/data/mamba_completion.posix b/libmamba/data/mamba_completion.posix index b57595801b..9a09d1e015 100644 --- a/libmamba/data/mamba_completion.posix +++ b/libmamba/data/mamba_completion.posix @@ -1,5 +1,5 @@ R"MAMBARAW( -if [[ -n "$ZSH_VERSION" ]]; then +if [ -n "${ZSH_VERSION:+x}" ]; then autoload -U +X compinit && compinit autoload -U +X bashcompinit && bashcompinit @@ -9,7 +9,8 @@ if [[ -n "$ZSH_VERSION" ]]; then } complete -o default -F _umamba_zsh_completions micromamba -else +fi +if [ -n "${BASH_VERSION:+x}" ]; then _umamba_bash_completions() { COMPREPLY=($($MAMBA_EXE completer "${COMP_WORDS[@]:1}"))