From 27035f0a29c51273765f2d7b0d4512d170d47511 Mon Sep 17 00:00:00 2001 From: Fernando Schauenburg Date: Fri, 1 Jul 2022 11:25:55 +0200 Subject: [PATCH] path: add comments for clarity --- config/shell/path.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/shell/path.sh b/config/shell/path.sh index a663adb..b991fa9 100644 --- a/config/shell/path.sh +++ b/config/shell/path.sh @@ -14,8 +14,8 @@ # Add custom bin dirs to PATH if they exist and are not already in PATH. while read -r dir; do case ":${PATH:=$dir}:" in - *:"$dir":*) ;; - *) PATH="$dir:$PATH" ;; + *:"$dir":*) ;; # already in PATH -> ignore + *) PATH="$dir:$PATH" ;; # not yet in PATH -> prepend it esac done </dev/null 2>&1 && MANPATH="$(unset MANPATH; manpath)" while read -r dir; do case ":${MANPATH:=$dir}:" in - *:"$dir":*) ;; - *) MANPATH="$dir:$MANPATH" ;; + *:"$dir":*) ;; # already in MANPATH -> ignore + *) MANPATH="$dir:$MANPATH" ;; # not yet in MANPATH -> prepend it esac done <