From d34a7c1341019b90dc0e7ab51420f8181ae4aa7d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 5 Nov 2016 01:54:47 +0100 Subject: [PATCH] Add localip aliases for macos and arch --- os/arch/aliases.zsh | 2 ++ os/macos/aliases.zsh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/os/arch/aliases.zsh b/os/arch/aliases.zsh index 7b6c8795..836a18c0 100644 --- a/os/arch/aliases.zsh +++ b/os/arch/aliases.zsh @@ -10,6 +10,8 @@ alias pacu='pacaur -Syu' # upgrade alias pacc='pacaur -Sc' # clean alias paco='pacaur -Qtdq' # orphaned packages +alias localip='ip route get 1 | awk {print $NF;exit}' + if (( $+commands[xclip] )); then alias y='xclip -selection clipboard -in' alias p='xclip -selection clipboard -out' diff --git a/os/macos/aliases.zsh b/os/macos/aliases.zsh index aa0d8f3d..fb5acf40 100644 --- a/os/macos/aliases.zsh +++ b/os/macos/aliases.zsh @@ -10,6 +10,8 @@ alias br='brew' alias bru='brew update && brew upgrade --all && brew cleanup' alias brc='brew cask' +alias localip="ipconfig getifaddr en1" + # OS X has no `md5sum`, so use `md5` as a fallback is-callable md5sum || alias md5sum="md5" # OS X has no `sha1sum`, so use `shasum` as a fallback