summaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorBen Hilburn <bhilburn@gmail.com>2017-07-17 20:33:30 +0300
committerGitHub <noreply@github.com>2017-07-17 20:33:30 +0300
commitc7cd2d54cf9a085d3cad947faf4acb1f960cdcdc (patch)
tree2c6ac3193538e6193634ba25423e7f88ffdf39ea /powerlevel9k.zsh-theme
parentc69d45cdcce1f0d0542673be23b7c524eb83870d (diff)
parent9a3d2e4ca14897c98f5215c5961a1a3cfd214da2 (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-xpowerlevel9k.zsh-theme5
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"