058bbe4f02be67102871d82de6aa194e6b865cf8

Author
Niccolò Maggioni <nicco.maggioni@gmail.com>
Committer
Niccolò Maggioni <nicco.maggioni@gmail.com>
Date

Message

General compatibility

Diff

 1diff --git a/plugins/systemadmin/systemadmin.plugin.zsh b/plugins/systemadmin/systemadmin.plugin.zsh
 2index f6641b273e0334532b5c63de35f92a8126d3cbe5..5618ba8f1d02883b689640736e863470d5bd8c39 100644
 3--- a/plugins/systemadmin/systemadmin.plugin.zsh
 4+++ b/plugins/systemadmin/systemadmin.plugin.zsh
 5@@ -145,7 +145,7 @@ geteip() {
 6 
 7 # determine local IP address
 8 getip() {
 9-    if [ "$(which ip)" != "" ]; then
10+    if [ $(hash | grep '^ip=') ]; then
11         ip addr | grep "inet " | grep -v '127.0.0.1' | awk '{print $2}'
12     else
13         ifconfig  | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'