init.sh 334 B

1234567891011121314151617
  1. # shellcheck source=/dev/null
  2. __source_from() {
  3. local __f='' __d="${XDG_CONFIG_HOME:-${HOME}/.config}/shell/${1:?}"
  4. for __f in "${__d}"/*.sh; do
  5. [ -r "${__f}" ] && . "${__f}"
  6. done
  7. }
  8. __source_from "aliasrc.d"
  9. __source_from "functions"
  10. __source_from "private/aliasrc.d"
  11. __source_from "private/functions"
  12. unset -f __source_from