Last active
December 14, 2015 05:18
-
-
Save udzura/55a523cbce494b9fd004 to your computer and use it in GitHub Desktop.
カレントパスや相対パス、空パスが $PATH に入っていたら警告するやつ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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