From b61387adc936dc51f1d9e84136aa9972ea8480e7 Mon Sep 17 00:00:00 2001 From: Thomas Schmucker Date: Sat, 1 Aug 2026 17:29:55 +0200 Subject: zsh: Schreibweise für Funktionen und 'source' vereinheitlicht MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zsh/zprofile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'zsh/zprofile') diff --git a/zsh/zprofile b/zsh/zprofile index cfb0fbb..7fed3a7 100644 --- a/zsh/zprofile +++ b/zsh/zprofile @@ -1,9 +1,13 @@ # vim: filetype=zsh -[[ -d "${HISTFILE:h}" ]] || mkdir -p "${HISTFILE:h}" +if [[ ! -d "${HISTFILE:h}" ]]; then + mkdir -p "${HISTFILE:h}" +fi add_path() { - [[ -d "$1" ]] && path=("$1" $path) + if [[ -d "$1" ]]; then + path=("$1" $path) + fi } set_include_lib_path() { @@ -57,3 +61,5 @@ if [[ -x /usr/local/bin/musicpd ]] && ! pgrep "musicpd" > /dev/null; then /usr/local/bin/musicpd fi +unfunction add_path +unfunction set_include_lib_path -- cgit v1.3