2012-06-15 16:54:02 +02:00
|
|
|
################################################################################
|
|
|
|
## Shell Config -- Master File
|
|
|
|
################################################################################
|
|
|
|
|
2014-01-04 17:56:06 +01:00
|
|
|
## Note that 'ps -o command= $$' gives the same result with parameters.
|
2014-01-11 21:56:38 +01:00
|
|
|
[ -z "$SHELL_CURRENT" ] && readonly SHELL_CURRENT="$(ps -o comm= $$)"
|
|
|
|
[ -z "$SHELL_DIR" ] && readonly SHELL_DIR="$HOME/.shell.d"
|
2012-06-15 16:54:02 +02:00
|
|
|
|
2013-12-22 12:44:53 +01:00
|
|
|
## .profile is sourced automatically by most login managers, but we need to
|
|
|
|
## source it manually to TTY.
|
2013-07-25 21:12:09 +02:00
|
|
|
[ -z "$DISPLAY" ] && [ -f "$HOME/.profile" ] && . "$HOME/.profile"
|
|
|
|
|
2013-07-29 20:10:12 +02:00
|
|
|
loadrc()
|
|
|
|
{
|
|
|
|
for i; do
|
|
|
|
[ -f "${SHELL_DIR}/$i" ] && . "${SHELL_DIR}/$i"
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
## main and options should be sourced first.
|
|
|
|
loadrc main_rc options_zsh
|
2012-07-19 17:01:22 +02:00
|
|
|
|
2012-08-13 18:18:56 +02:00
|
|
|
## Source order should not matter.
|
2013-07-29 20:10:12 +02:00
|
|
|
loadrc keys_zsh
|
|
|
|
loadrc alias_rc colors_rc completion_rc funs_rc
|
2013-05-22 17:54:53 +02:00
|
|
|
|
2013-09-10 14:58:15 +02:00
|
|
|
## Shell hook: should be sourced last.
|
|
|
|
loadrc hook
|
|
|
|
|
2013-07-28 11:48:24 +02:00
|
|
|
## Browser autostart. See .scripts/browser-autostart
|
2013-08-05 00:56:23 +02:00
|
|
|
[ -n "$BROWSER_AUTOSTART" ] && unset BROWSER_AUTOSTART && browse
|