From 221aec2b352779ce64033a6999ab1cb3427111d4 Mon Sep 17 00:00:00 2001 From: Andrea Mistrali Date: Wed, 30 Oct 2024 12:00:25 +0100 Subject: [PATCH] zshrc --- zshrc | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/zshrc b/zshrc index 2324606..9bb7bf5 100644 --- a/zshrc +++ b/zshrc @@ -12,13 +12,6 @@ # profiling data at startup 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 { [ -d $1/zshfunctions ] && fpath=($1/zshfunctions $fpath) [ -d $1/completions ] && fpath=($1/completions $fpath) @@ -29,7 +22,15 @@ function loadRC { } # 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 LIBRARY=${BASE}/zsh.d @@ -38,9 +39,6 @@ local KERNLIB=${LIBRARY}/${KERNEL} loadRC ${KERNLIB} loadRC ${LIBRARY} -# Add home bin to PATH -PATH="$PATH:$HOME/bin" - # # Add local customization file # if [ -w $LIBRARY ]; then # [ -f $LIBRARY/99-local.zsh ] || echo "# Local customizations" > $LIBRARY/99-local.zsh