mirror of https://github.com/akelge/zsh
zshrc
This commit is contained in:
parent
2498b711e8
commit
221aec2b35
20
zshrc
20
zshrc
|
@ -12,13 +12,6 @@
|
||||||
# profiling data at startup
|
# profiling data at startup
|
||||||
zmodload zsh/zprof
|
zmodload zsh/zprof
|
||||||
|
|
||||||
# Determine zsh conf file position. On Debian/Ubuntu is /etc/zsh, on other should be /etc
|
|
||||||
#
|
|
||||||
[ -d /etc/zsh ] && BASE="/etc/zsh" || BASE="/etc"
|
|
||||||
|
|
||||||
# If there is a .zsh directory into user's home, use that one instead (local install)
|
|
||||||
[ -d ~/.zsh ] && BASE=~/.zsh
|
|
||||||
|
|
||||||
function loadRC {
|
function loadRC {
|
||||||
[ -d $1/zshfunctions ] && fpath=($1/zshfunctions $fpath)
|
[ -d $1/zshfunctions ] && fpath=($1/zshfunctions $fpath)
|
||||||
[ -d $1/completions ] && fpath=($1/completions $fpath)
|
[ -d $1/completions ] && fpath=($1/completions $fpath)
|
||||||
|
@ -29,7 +22,15 @@ function loadRC {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Default PATH
|
# Default PATH
|
||||||
PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin"
|
PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:$HOME/bin"
|
||||||
|
|
||||||
|
local BASE="/etc"
|
||||||
|
# Determine zsh conf file position. On Debian/Ubuntu is /etc/zsh, on other should be /etc
|
||||||
|
[ -d /etc/zsh ] && BASE="/etc/zsh"
|
||||||
|
|
||||||
|
# If there is a .zsh directory into user's home, use that one instead (local install)
|
||||||
|
[ -d ~/.zsh ] && BASE=~/.zsh
|
||||||
|
|
||||||
|
|
||||||
local KERNEL=`uname -s`
|
local KERNEL=`uname -s`
|
||||||
local LIBRARY=${BASE}/zsh.d
|
local LIBRARY=${BASE}/zsh.d
|
||||||
|
@ -38,9 +39,6 @@ local KERNLIB=${LIBRARY}/${KERNEL}
|
||||||
loadRC ${KERNLIB}
|
loadRC ${KERNLIB}
|
||||||
loadRC ${LIBRARY}
|
loadRC ${LIBRARY}
|
||||||
|
|
||||||
# Add home bin to PATH
|
|
||||||
PATH="$PATH:$HOME/bin"
|
|
||||||
|
|
||||||
# # Add local customization file
|
# # Add local customization file
|
||||||
# if [ -w $LIBRARY ]; then
|
# if [ -w $LIBRARY ]; then
|
||||||
# [ -f $LIBRARY/99-local.zsh ] || echo "# Local customizations" > $LIBRARY/99-local.zsh
|
# [ -f $LIBRARY/99-local.zsh ] || echo "# Local customizations" > $LIBRARY/99-local.zsh
|
||||||
|
|
Loading…
Reference in New Issue