From fb14d788ba16e96ce31ab4096f150f3de9623d58 Mon Sep 17 00:00:00 2001 From: "J. Elfring (i)" Date: Thu, 15 Dec 2022 11:27:06 +0100 Subject: [PATCH] enable completion for bash --- simpleDots/bashrc | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/simpleDots/bashrc b/simpleDots/bashrc index 1e49157..8e5ec89 100644 --- a/simpleDots/bashrc +++ b/simpleDots/bashrc @@ -76,20 +76,20 @@ alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo # enable programmable completion features (you don't need to enable # this, if it's already enabled in /etc/bash.bashrc and /etc/profile # sources /etc/bash.bashrc). -#if ! shopt -oq posix; then -# if [[ -f /usr/share/bash-completion/bash_completion ]]; then -# . /usr/share/bash-completion/bash_completion -# elif [[ -f /etc/bash_completion ]]; then -# . /etc/bash_completion -# fi -#fi -# -#if [ -d /etc/bash_completion.d ] -#then -# for file in /etc/bash_completion.d/* ; do -# source "$file" -# done -#fi +if ! shopt -oq posix; then + if [[ -f /usr/share/bash-completion/bash_completion ]]; then + . /usr/share/bash-completion/bash_completion + elif [[ -f /etc/bash_completion ]]; then + . /etc/bash_completion + fi +fi + +if [ -d /etc/bash_completion.d ] +then + for file in /etc/bash_completion.d/* ; do + source "$file" + done +fi if [[ -f $HOME/.bash_profile ]]; then source $HOME/.bash_profile