From 18a9bfb36bf79db6359ab1f321e938a099d5fa1b Mon Sep 17 00:00:00 2001 From: Marlon Richert Date: Mon, 13 Dec 2021 21:19:18 +0200 Subject: [PATCH] Show dotfiles if and only if `GLOB_DOTS` is set Resolves #384. --- scripts/.autocomplete.config | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/.autocomplete.config b/scripts/.autocomplete.config index 8546f922..e273011e 100644 --- a/scripts/.autocomplete.config +++ b/scripts/.autocomplete.config @@ -5,8 +5,9 @@ typeset -g ZLE_REMOVE_SUFFIX_CHARS=$' /;\n\r\t' typeset -g ZLE_SPACE_SUFFIX_CHARS=$'|&<>-+' .autocomplete.config.precmd() { - typeset -gHa _comp_options=( $_comp_options[@] globdots ) - typeset -gH _comp_setup="$_comp_setup"$';\nlocal +h path=( $path[@] . )' + typeset -gH _comp_setup="$_comp_setup"'; + [[ $_comp_caller_options[globdots] == yes ]] && setopt globdots; + local +h path=( $path[@] . )' # Remove incompatible settings. builtin zstyle -d ':completion:*:functions' ignored-patterns