1
0
mirror of https://github.com/akelge/zsh synced 2025-08-15 14:28:35 +00:00

Real bump!!!

This commit is contained in:
2024-10-30 12:31:19 +01:00
parent 221aec2b35
commit 1fe3029353
4 changed files with 16 additions and 49 deletions

33
zshrc
View File

@ -12,34 +12,31 @@
# profiling data at startup
zmodload zsh/zprof
function loadRC {
[ -d $1/zshfunctions ] && fpath=($1/zshfunctions $fpath)
[ -d $1/completions ] && fpath=($1/completions $fpath)
for zshFile in $1/[0-9]*.zsh; do
source $zshFile
done
}
# Default PATH
PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:$HOME/bin"
# Determine zsh conf file position.
local BASE="/etc"
# Determine zsh conf file position. On Debian/Ubuntu is /etc/zsh, on other should be /etc
# 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 LIBRARY=${BASE}/zsh.d
local KERNLIB=${LIBRARY}/${KERNEL}
# local KERNEL=`uname -s`
local KERNLIB=${LIBRARY}/$(uname -s)
loadRC ${KERNLIB}
loadRC ${LIBRARY}
# loadRC ${LIBRARY} ${KERNLIB}
for subdir in $LIBRARY $KERNLIB; do
[ -d $subdir/zshfunctions ] && fsubdir=($subdir/zshfunctions $fsubdir)
[ -d $subdir/completions ] && fsubdir=($subdir/completions $fsubdir)
for zshFile in $subdir/[0-9]*.zsh; do
# echo $zshFile
source $zshFile
done
done
# # Add local customization file
# if [ -w $LIBRARY ]; then
# [ -f $LIBRARY/99-local.zsh ] || echo "# Local customizations" > $LIBRARY/99-local.zsh
# fi