nix/module/common/bash/Bashrc.sh
2024-03-04 03:04:57 +03:00

19 lines
374 B
Bash

# If not running interactively, don't do anything.
[[ "$-" != *i* ]] && return
# Src system bashrc.
[[ -f /etc/bashrc ]] && source /etc/bashrc
# Src custom modules.
for module in ${BASH_MODULE_PATH}/*.sh; do
source "${module}"
done
# Alias to reload.
function bashrc() {
source ${BASH_PATH}/Bashrc.sh
}
# Export all functions.
export -f $(find_function | tr '\n' ' ')