Created
April 8, 2013 22:02
-
-
Save nvk/5340940 to your computer and use it in GitHub Desktop.
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
ip(){ | |
hrline 36 | |
# Gets external IP from opendns.com | |
print -P "%F{240}|%f %F{$colorInfo}=> External IP%f `dig +short myip.opendns.com @resolver1.opendns.com` %F{240}|%f" | |
# Get's local IP from ipconfig | |
print -P "%F{240}|%f %F{$colorSecondary}=> Local IP %f `ipconfig getifaddr en0` %F{240}|%f" | |
# make line, https://gist.github.com/nvk/5340820 | |
hrline 36 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment