Merge pull request #1037 from dritter/fix_vpn_ip_segment

Fix vpn_ip segment
This commit is contained in:
Dominik Ritter 2018-11-16 21:02:29 +01:00 committed by GitHub
commit 5abac53698
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1134,7 +1134,7 @@ prompt_ip() {
set_default POWERLEVEL9K_VPN_IP_INTERFACE "tun"
# prompt if vpn active
prompt_vpn_ip() {
for vpn_iface in $(/sbin/ifconfig | 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=$(/sbin/ifconfig "$vpn_iface" | grep -o "inet\s.*" | cut -d' ' -f2)
"$1_prompt_segment" "$0" "$2" "cyan" "$DEFAULT_COLOR" "$ip" 'VPN_ICON'