Skip to content

Instantly share code, notes, and snippets.

@udzura
Last active December 14, 2015 05:18
Show Gist options
  • Save udzura/55a523cbce494b9fd004 to your computer and use it in GitHub Desktop.
Save udzura/55a523cbce494b9fd004 to your computer and use it in GitHub Desktop.
カレントパスや相対パス、空パスが $PATH に入っていたら警告するやつ
# -*- mode: sh -*-
precmd() {
if echo $PATH | grep -qE '(^|:)([^/]|$)'; then
echo -e "\e[31m\e[1mWARNING! Current path or relative path is included in your \$PATH:\n\e[35m${PATH}\e[0m"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment