diff zshrc-gentoo @ 73:a48ea5d61dee

add alias for printing all IP addresses
author Dirk Olmes <dirk@xanthippe.ping.de>
date Tue, 11 Aug 2015 17:48:12 +0200
parents 42efae6b3fe2
children fbf374902161
line wrap: on
line diff
--- a/zshrc-gentoo	Wed Jul 08 16:37:26 2015 +0200
+++ b/zshrc-gentoo	Tue Aug 11 17:48:12 2015 +0200
@@ -24,6 +24,13 @@
 alias xm="xmodmap ~/.Xmodmap"
 
 # custom functions for gentoo
+ipa() {
+	CMD="ip addr show"
+	if [ $# -gt 0 ]; then
+		CMD="$CMD dev $1"
+	fi
+	eval $CMD
+}
 kcs() { source $HOME/.keychain/${HOST}-sh }
 ll() { /usr/bin/env -u LC_ALL LANG=C ls -laFh "$@" | more }
 lr() { /usr/bin/env -u LC_ALL LANG=C ls -rtlh "$@" }