Skip to content

Commit 30c68a8

Browse files
committed
profile: support comments for paths
1 parent d7b15f8 commit 30c68a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

profile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ _IFS="$IFS" IFS='
1515
export PATH MANPATH
1616

1717
for pth in $(cat /etc/paths.d/._* /etc/paths /etc/paths.d/*); do
18-
PATH="$PATH:$pth"
18+
[ "${pth:0:1}" != '#' ] && PATH="$PATH:$pth"
1919
done 2>/dev/null
2020

2121
for pth in $(cat /etc/manpaths.d/._* /etc/manpaths /etc/manpaths.d/*); do
22-
MANPATH="$MANPATH:$pth"
22+
[ "${pth:0:1}" != '#' ] && MANPATH="$MANPATH:$pth"
2323
done 2>/dev/null
2424
: ${PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin}
2525
: ${MANPATH=/usr/share/man:/usr/local/share/man}

0 commit comments

Comments
 (0)