Skip to content
Snippets Groups Projects
Commit 47f024d7 authored by Sven Mäder's avatar Sven Mäder :speech_balloon:
Browse files

Load bash-completions from ~/.local/share/bash-completion

parent 99efa4c9
No related branches found
No related tags found
No related merge requests found
......@@ -2,3 +2,14 @@
# load system bash-completion
source_if_exists /etc/profile.d/bash_completion.sh
# bash completions for local commands in ~/.local/bin
LOCAL_COMMANDS="fzf tldr zellij uv xh sd delta dust pdu dog hyperfine btm broot lsd eza yazi"
for LOCAL_COMMAND in ${LOCAL_COMMANDS}; do
#if [ -x "$(command -v ${LOCAL_COMMAND})" ]; then # POSIX compatible
if hash ${LOCAL_COMMAND} 2>/dev/null; then # bash builtin
if [ -x ${HOME}/.local/bin/${LOCAL_COMMAND} ]; then
source_if_exists "${HOME}/.local/share/bash-completion/${LOCAL_COMMAND}"
fi
fi
done
......@@ -25,12 +25,12 @@ if [ -f ~/git/gitlab/py-ethz/bin/ethz-completion.bash ] && ! shopt -oq posix; th
fi
# bash completions for local commands in ~/.local/bin
LOCAL_COMMANDS="fzf tldr zellij uv xh sd delta dust pdu dog hyperfine btm broot lsd eza"
LOCAL_COMMANDS="fzf tldr zellij uv xh sd delta dust pdu dog hyperfine btm broot lsd eza yazi"
for LOCAL_COMMAND in ${LOCAL_COMMANDS}; do
#if [ -x "$(command -v ${LOCAL_COMMAND})" ]; then # POSIX compatible
if hash ${LOCAL_COMMAND} 2>/dev/null; then # bash builtin
if [ -x ~/.local/bin/${LOCAL_COMMAND} ]; then
source_if_exists "${ENVRCD_PATH}/profile/_assets/completions/${LOCAL_COMMAND}_bash"
if [ -x ${HOME}/.local/bin/${LOCAL_COMMAND} ]; then
source_if_exists "${HOME}/.local/share/bash-completion/${LOCAL_COMMAND}"
fi
fi
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment