Fix bash-completions dir

Add color to autostart-manage info
This commit is contained in:
Tobias Reisinger 2024-02-01 15:28:03 +01:00
parent 056b7fc89e
commit ef3602167e
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
2 changed files with 21 additions and 4 deletions
autoinstall

View file

@ -33,8 +33,11 @@ then
if [ -n "$completions" ]
then
echo "Installing completions for $exe"
# shellcheck disable=SC2086
"$target" $completions > "$XDG_CONFIG_HOME/completionsrc.d/_$(basename "$exe")"
# path taken from "__load_completion" function
bash_completions_dir=${BASH_COMPLETION_USER_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion}/completions
mkdir -p "$bash_completions_dir"
eval "$target $completions" > "$bash_completions_dir/_$(basename "$exe")"
fi
fi