26 lines
1,013 B
Bash
26 lines
1,013 B
Bash
_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
|