diff options
author | Niccolò Maggioni <nicco.maggioni@gmail.com> | 2015-08-26 10:54:08 +0200 |
---|---|---|
committer | Niccolò Maggioni <nicco.maggioni@gmail.com> | 2015-08-26 10:54:08 +0200 |
commit | 058bbe4f02be67102871d82de6aa194e6b865cf8 (patch) | |
tree | c28ceac0718e70a481ccf53be94e5b077e0a54e7 | |
parent | a127c4f88e9807c9d5ac58f5424dfc479370c227 (diff) | |
download | zsh-058bbe4f02be67102871d82de6aa194e6b865cf8.tar.gz zsh-058bbe4f02be67102871d82de6aa194e6b865cf8.tar.bz2 zsh-058bbe4f02be67102871d82de6aa194e6b865cf8.zip |
General compatibility
-rw-r--r-- | plugins/systemadmin/systemadmin.plugin.zsh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/systemadmin/systemadmin.plugin.zsh b/plugins/systemadmin/systemadmin.plugin.zsh index f6641b273..5618ba8f1 100644 --- a/plugins/systemadmin/systemadmin.plugin.zsh +++ b/plugins/systemadmin/systemadmin.plugin.zsh @@ -145,7 +145,7 @@ geteip() { # determine local IP address getip() { - if [ "$(which ip)" != "" ]; then + if [ $(hash | grep '^ip=') ]; then ip addr | grep "inet " | grep -v '127.0.0.1' | awk '{print $2}' else ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}' |