dotfiles/bin/reload-funcs-bashrc

18 lines
718 B
Bash
Executable File

#!/bin/env bash
echo "---> Refreshing custom functions..."
sleep 5
# change the path if it's different
source ~/.dotfiles/bashrc/worthwhile-functions
if [[ $? == 0 ]]; then
echo "info: Successfully refreshed functions to current session."
echo "info: Something don't work? Run edit-funcs-bashrc to edit"
echo "info: or even remove problematic functions"
else
echo "! Problems found, please run edit-funcs-bashrc to fix"
echo " and re-run this command again. In case of path changes,"
echo " please do 'source ~/.bashrc' if issue presists."
echo " If you ever moved that file, also update your ~/.bashrc and"
echo " the ~/.dotfiles/bin/reload-funcs-bashrc\#L5"
fi