2012-06-15 16:54:02 +02:00
|
|
|
################################################################################
|
|
|
|
## Shell Config -- Master File
|
2012-08-13 18:18:56 +02:00
|
|
|
## Date 2012-08-11
|
2012-06-15 16:54:02 +02:00
|
|
|
################################################################################
|
|
|
|
|
|
|
|
##==============================================================================
|
|
|
|
## Sourcing
|
|
|
|
##==============================================================================
|
|
|
|
|
2012-10-29 17:22:41 +01:00
|
|
|
SHELL_CURRENT="$(ps -o command="" $$)"
|
2012-08-13 18:18:56 +02:00
|
|
|
SHELL_DIR="$HOME/.shell.d"
|
2012-06-15 16:54:02 +02:00
|
|
|
|
2013-07-27 11:12:25 +02:00
|
|
|
## Need to be expanded for external scripts to fetch zsh hook file location.
|
|
|
|
HOOK_FILE="$HOME/.shell.d/hook"
|
|
|
|
|
2013-07-25 21:12:09 +02:00
|
|
|
## .profile is sourced automatically when X is started, but we need to source it
|
|
|
|
## manually to TTY.
|
|
|
|
[ -z "$DISPLAY" ] && [ -f "$HOME/.profile" ] && . "$HOME/.profile"
|
|
|
|
|
2012-08-13 18:18:56 +02:00
|
|
|
## Should be sourced first.
|
2013-06-04 08:51:17 +02:00
|
|
|
[ -f "${SHELL_DIR}/main_rc" ] && . "${SHELL_DIR}/main_rc"
|
|
|
|
[ -f "${SHELL_DIR}/options_zsh" ] && . "${SHELL_DIR}/options_zsh"
|
2012-07-19 17:01:22 +02:00
|
|
|
|
2012-08-13 18:18:56 +02:00
|
|
|
## Source order should not matter.
|
2013-06-04 08:51:17 +02:00
|
|
|
[ -f "${SHELL_DIR}/alias_rc" ] && . "${SHELL_DIR}/alias_rc"
|
|
|
|
[ -f "${SHELL_DIR}/colors_zsh" ] && . "${SHELL_DIR}/colors_zsh"
|
|
|
|
[ -f "${SHELL_DIR}/completion_rc" ] && . "${SHELL_DIR}/completion_rc"
|
|
|
|
[ -f "${SHELL_DIR}/funs_rc" ] && . "${SHELL_DIR}/funs_rc"
|
|
|
|
[ -f "${SHELL_DIR}/keys_zsh" ] && . "${SHELL_DIR}/keys_zsh"
|
2013-05-22 17:54:53 +02:00
|
|
|
|
|
|
|
## Should be sourced last
|
2013-07-27 11:12:25 +02:00
|
|
|
[ -f "$HOOK_FILE" ] && . "$HOOK_FILE"
|