This commit is contained in:
pika 2025-05-22 10:35:57 +02:00
parent 9c487ce6d2
commit 74357e75d7
2 changed files with 12 additions and 28 deletions

View file

@ -1,26 +0,0 @@
_plugins() {
local bash_dir="$HOME/.bash/plugins"
if [ -d "$bash_dir" ]; then
echo_info "Plugins will be loadet.."
# ─< plugins to configure (usually just the filename in the plugins list) >───────────────
local plugAutopairs="autopairs.sh"
local sshCompletion="ssh"
# ─< active plugins >─────────────────────────────────────────────────────────────────────
plugins=(
"$plugAutopairs"
"$sshCompletion"
)
# ─< loop through and source the plugins >────────────────────────────────────────────────
for plugin in "${plugins[@]}"; do
if [ -f "${bash_dir}/${plugin}" ]; then
echo_plugin "${bash_dir}/${plugin}"
. "${bash_dir}/${plugin}"
fi
done
fi
}
_plugins

14
.bashrc
View file

@ -86,6 +86,12 @@ check_root() {
fi fi
} }
_source() {
[[ -e "$1" ]] &&
. "$1" &&
echo "Sourced $1"
}
_sources() { _sources() {
local sourceDir="$HOME/.bash" local sourceDir="$HOME/.bash"
local sourceOptions=( local sourceOptions=(
@ -282,12 +288,16 @@ main() {
# _sources # _sources
# _blesh # _blesh
_init _init
[[ -e "$HOME/.bash_aliases" ]] &&
. "$HOME/.bash_aliases"
_color_prompt_ _color_prompt_
_env _env
check_root check_root
_end _end
_source "$HOME/.bash_aliases"
_source "$HOME/.bash/plugins/autopairs.sh"
_source "$HOME/.fzf/shell/completion.bash"
_source "$HOME/.fzf/shell/key-bindings.bash"
} }
main main