Skip to content

Commit

Permalink
Do not overwrite the PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
kigster committed Jul 9, 2021
1 parent f122b31 commit f36a80b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions init.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/usr/bin/env bash
# vim: ft=bash
PATH="/usr/local/bin:/usr/bin:/bin:/sbin:/usr/sbin:/opt/local/bin:${PATH}"
export PATH

for path in /usr/local/bin /usr/bin /bin /sbin /usr/sbin /opt/local/bin; do
[[ -d "${path}" ]] && echo "${PATH}" | grep -q "${path}" || export PATH="${PATH}"
done

set +e
export SHELL_COMMAND
Expand Down

0 comments on commit f36a80b

Please sign in to comment.