diff options
author | Ben Hilburn <bhilburn@gmail.com> | 2017-07-17 20:33:30 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-17 20:33:30 +0300 |
commit | c7cd2d54cf9a085d3cad947faf4acb1f960cdcdc (patch) | |
tree | 2c6ac3193538e6193634ba25423e7f88ffdf39ea /powerlevel9k.zsh-theme | |
parent | c69d45cdcce1f0d0542673be23b7c524eb83870d (diff) | |
parent | 9a3d2e4ca14897c98f5215c5961a1a3cfd214da2 (diff) |
Merge pull request #541 from golgoth31/next
vpn prompt: change "ip" to "ifconfig" to be used on OSX
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-x | powerlevel9k.zsh-theme | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index b08155ed..d941e44d 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -900,14 +900,13 @@ prompt_ip() { set_default POWERLEVEL9K_VPN_IP_INTERFACE "tun" # prompt if vpn active prompt_vpn_ip() { - for vpn_iface in $(ip tuntap | grep -e ^"$POWERLEVEL9K_VPN_IP_INTERFACE" | cut -d":" -f1) + for vpn_iface in $(/sbin/ifconfig | grep -e ^"$POWERLEVEL9K_VPN_IP_INTERFACE" | cut -d":" -f1) do - ip=$(ip -4 a show "$vpn_iface" | grep -o "inet\s*[0-9.]*" | grep -o "[0-9.]*") + ip=$(/sbin/ifconfig "$vpn_iface" | grep -o "inet\s.*" | cut -d' ' -f2) "$1_prompt_segment" "$0" "$2" "cyan" "$DEFAULT_COLOR" "$ip" 'VPN_ICON' done } - prompt_load() { # The load segment can have three different states local current_state="unknown" |