From e8c65f32058a4a326923e6f1635cc2a61525eaa9 Mon Sep 17 00:00:00 2001 From: Xavier Logerais Date: Sun, 23 Aug 2026 16:17:05 +0200 Subject: [PATCH] fix: Try to fix completion --- bashrc | 13 +++++++++++++ completion.d/mise | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/bashrc b/bashrc index 58e4b1b..eaf82b1 100644 --- a/bashrc +++ b/bashrc @@ -84,6 +84,19 @@ _source_dir_files "${BASH_CONFIG_DIR}"/aliases.d # /etc/profile.d/bash_completion.sh for login shells and the package's # own non-login hook — no need to re-source it manually here. +# Use bash-completion, if available, and avoid double-sourcing +[[ $PS1 && + ! ${BASH_COMPLETION_VERSINFO:-} && + -f /usr/share/bash-completion/bash_completion ]] && + . /usr/share/bash-completion/bash_completion + +# Location for user bash completion +# ${BASH_COMPLETION_USER_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion}/completions + +# See https://serverfault.com/questions/506612/standard-place-for-user-defined-bash-completion-d-scripts +# Recommended dirs +# - ~/.bash_completion.d -> ${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion +# - ~/.bash_completion -> ${XDG_CONFIG_HOME:-$HOME/.config}/bash_completion _source_file_if_exists ~/.bash_completion _source_file_if_exists "${BASH_CONFIG_DIR}"/completion _source_dir_files "${BASH_CONFIG_DIR}"/completion diff --git a/completion.d/mise b/completion.d/mise index 93344fb..3759539 100644 --- a/completion.d/mise +++ b/completion.d/mise @@ -1,3 +1,4 @@ if (command -v mise &>/dev/null); then - source <(mise completion bash --include-bash-completion-lib) + #source <(mise completion bash --include-bash-completion-lib) + source <(mise completion bash) fi