mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-14 09:00:07 +00:00
Merge pull request #541 from golgoth31/next
vpn prompt: change "ip" to "ifconfig" to be used on OSX
This commit is contained in:
commit
c7cd2d54cf
1 changed files with 2 additions and 3 deletions
|
@ -900,14 +900,13 @@ prompt_ip() {
|
||||||
set_default POWERLEVEL9K_VPN_IP_INTERFACE "tun"
|
set_default POWERLEVEL9K_VPN_IP_INTERFACE "tun"
|
||||||
# prompt if vpn active
|
# prompt if vpn active
|
||||||
prompt_vpn_ip() {
|
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
|
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'
|
"$1_prompt_segment" "$0" "$2" "cyan" "$DEFAULT_COLOR" "$ip" 'VPN_ICON'
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
prompt_load() {
|
prompt_load() {
|
||||||
# The load segment can have three different states
|
# The load segment can have three different states
|
||||||
local current_state="unknown"
|
local current_state="unknown"
|
||||||
|
|
Loading…
Reference in a new issue