|
@@ -6,40 +6,14 @@
|
|
# but WITHOUT ANY WARRANTY
|
|
# but WITHOUT ANY WARRANTY
|
|
#
|
|
#
|
|
|
|
|
|
-# define personal zsh config directory
|
|
|
|
|
|
+# Define personal zsh config directory
|
|
export ZSHDOTDIR="${HOME}/.zsh"
|
|
export ZSHDOTDIR="${HOME}/.zsh"
|
|
|
|
|
|
-# redefine PATH
|
|
|
|
-export PATH="${HOME}/bin:${HOME}/.bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
|
|
|
|
-
|
|
|
|
-# load prezto
|
|
|
|
-BUNDLES_ROOT="${ZSHDOTDIR}/bundles"
|
|
|
|
-PREZTO_INIT="${BUNDLES_ROOT}/prezto/init.zsh"
|
|
|
|
-if [ -f "${PREZTO_INIT}" ]; then
|
|
|
|
- export ZDOTDIR="${BUNDLES_ROOT}"
|
|
|
|
- source "${PREZTO_INIT}"
|
|
|
|
- unset ZDOTDIR
|
|
|
|
-fi
|
|
|
|
-unset BUNDLES_ROOT PREZTO_INIT
|
|
|
|
-
|
|
|
|
-# overide insecure stuff with compinit while using 'sudo zsh'
|
|
|
|
-# my functions (don't forget to modify fpath before call compinit !!)
|
|
|
|
-#if [ -z "$SUDO_USER" -a "$UID" != 0 ]; then
|
|
|
|
-# fpath=($ZSHDOTDIR/functions.d $fpath)
|
|
|
|
-#fi
|
|
|
|
-
|
|
|
|
-# include custom configuration
|
|
|
|
|
|
+# Include custom configuration
|
|
for f in ${ZSHDOTDIR}/config/*.zsh; do
|
|
for f in ${ZSHDOTDIR}/config/*.zsh; do
|
|
if [[ -r "${f}" ]]; then
|
|
if [[ -r "${f}" ]]; then
|
|
. "${f}"
|
|
. "${f}"
|
|
fi
|
|
fi
|
|
done
|
|
done
|
|
|
|
|
|
-# using 'sudo zsh'
|
|
|
|
-if [ "$SUDO_USER" -a "$UID" = 0 ]; then
|
|
|
|
- # define root history path
|
|
|
|
- export HISTFILE="$ZSHDOTDIR/history/history_root"
|
|
|
|
- # ugly hack : reset some file perms to normal to avoid warnings
|
|
|
|
- chmod 0644 ~/.zcompdump
|
|
|
|
- chown "$SUDO_USER:$SUDO_USER" ~/.zcompdump
|
|
|
|
-fi
|
|
|
|
|
|
+unset ZSHDOTDIR
|