Skip to content

Commit 622c423

Browse files
committed
Fix up ipp/ipl aliases
1 parent 59e0207 commit 622c423

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

system/.alias

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ alias ncuw="npm-check-updates --interactive --root --workspaces"
5757

5858
# Network
5959

60-
alias ip="curl -s ipinfo.io | jq -r '.ip'"
61-
alias ipl="ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1'"
60+
alias ipp="dig +short myip.opendns.com @resolver1.opendns.com"
61+
alias ipl="ip route get 1.1.1.1 2>/dev/null | awk 'NR==1{print \$7}'"
6262

6363
# Miscellaneous
6464

system/.alias.macos

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
alias cpwd="pwd|tr -d '\n'|pbcopy"
44

5+
# Get local IP address
6+
7+
alias ipl="ifconfig | grep 'inet ' | grep -v 127.0.0.1 | awk '{print \$2}' | head -1"
8+
59
# Application shortcuts
610

711
alias gg="$VISUAL_GIT"

0 commit comments

Comments
 (0)