Permalink
Browse files

add some environment (host, os, arch, etc.) info to dotto_vars; load …

…~/.zshprefs if present
  • Loading branch information...
1 parent f15bcdb commit b4a3a59cc4d3c521e0d4db8bb533783cdadace22 @rsanders committed Feb 10, 2012
Showing with 14 additions and 3 deletions.
  1. +14 −3 zsh/core/zshenv
View
@@ -18,8 +18,17 @@ function () {
typeset -g -H -U -T DOTTO_ZSH_PLUGIN_ROOTS dotto_zsh_plugin_roots
typeset -g -H -U -T DOTTO_ZSH_PLUGIN_PATHS dotto_zsh_plugin_paths
+ # some environment vars
typeset -g -x SHORTHOST=${SHORTHOST:-${HOST//.*/}}
+ dotto_vars[hostname]=$HOST
+ dotto_vars[shorthost]=$SHORTHOST
+
+ set `uname -srm`
+ dotto_vars[os]=$1
+ dotto_vars[os_version]=$2
+ dotto_vars[arch]=$3
+
# various useful bits and well-known configuration vars
typeset -g ZSH_THEME ZSH_CUSTOM
@@ -84,7 +93,8 @@ function () {
$DOTTODIR/external/*/zsh/prefs(.N) \
$DOTTODIR/external/*/users/$USERNAME/zsh/prefs(.N) \
$DOTTODIR/local/prefs(N) \
- $DOTTODIR/local/zsh/prefs(N)
+ $DOTTODIR/local/zsh/prefs(N) \
+ $HOME/.zshprefs(N)
do
source $zcfile
done
@@ -110,7 +120,8 @@ function () {
$ZCONFIGDIR/plugins(/N))
##
- ## XXX: load plugins - in progress
+ ## load plugins - mostly collect a list of files and functions
+ ## to run at the appropriate time in later phases (zprofile, zshrc, etc.)
##
dotto~zsh_plugin_paths
@@ -119,7 +130,7 @@ function () {
useplugin $pname
done
- ## run builtin and plugin files
+ ## run builtin and plugin 'zshenv' files
zrunsystem zshenv
for file in $ZCONFIGDIR/zshenv.d/*(.N) \

0 comments on commit b4a3a59

Please sign in to comment.