From 1f2a5d9f55313f3bf6eef87b297f10ee7582fa2a Mon Sep 17 00:00:00 2001 From: Mehdi Sadeghi Date: Sun, 30 May 2021 21:22:47 +0200 Subject: Improve bash completion. --- .bashrc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.bashrc b/.bashrc index c0326c2..5d15aa2 100644 --- a/.bashrc +++ b/.bashrc @@ -1,6 +1,19 @@ [ -n "$ENV" ] && . "$ENV" || [ -e ~/.env ] && . ~/.env +# Prompt for Bash export PS1="\[\033[1;33m\]\u@\h:\W\$ \[\033[0m\]" +# Verify before running history command +shopt -s histverify + +# See Bash man +_completion_loader() +{ + # Completion files on Arch + . "/usr/share/bash-completion/completions/$1" >/dev/null 2>&1 && return 124 +} +complete -D -F _completion_loader -o bashdefault -o default + +# Load if available [ -f ~/.fzf.bash ] && . ~/.fzf.bash [ -f ~/.config/broot/launcher/bash/br ] && . ~/.config/broot/launcher/bash/br -- cgit v1.2.3