Skip to content

Instantly share code, notes, and snippets.

@YourFriendCaspian
Created August 18, 2017 10:01
Show Gist options
  • Save YourFriendCaspian/464b864e311f67d120675d07a2d742f4 to your computer and use it in GitHub Desktop.
Save YourFriendCaspian/464b864e311f67d120675d07a2d742f4 to your computer and use it in GitHub Desktop.
Show PATH?
#!/usr/bin/env zsh
# This came from Greg V's dotfiles:
# https://github.com/myfreeweb/dotfiles
# Feel free to steal it, but attribution is nice
autoload colors && colors
echo $PATH | tr ":" "\n" | \
awk "{ sub(\"/usr\", \"$fg_no_bold[green]/usr$reset_color\"); \
sub(\"/bin\", \"$fg_bold[blue]/bin$reset_color\"); \
sub(\"/sbin\", \"$fg_bold[magenta]/sbin$reset_color\"); \
sub(\"/local\", \"$fg_no_bold[yellow]/local$reset_color\"); \
sub(\"/opt\", \"$fg_no_bold[cyan]/opt$reset_color\"); \
sub(\"/Users\", \"$fg_no_bold[red]/Users$reset_color\"); \
sub(\"/home\", \"$fg_no_bold[red]/home$reset_color\"); \
print }"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment