diff --git a/themes/ys-pep-2.zsh-theme b/themes/ys-pep-2.zsh-theme index 372cb9d60..59c0e97e3 100644 --- a/themes/ys-pep-2.zsh-theme +++ b/themes/ys-pep-2.zsh-theme @@ -75,7 +75,9 @@ yspep_my_ip() { else echo -n $( while read num dev etc; do - ip -d -o addr sh ${dev:0: -1} | + dev="${dev:0: -1}" # Remove trailing colon + dev="${dev//@*/}" # Remove "@xxx" prefix + ip -d -o addr sh ${dev} | awk '$3 == "inet" {sub(/\/[0-9]+/, "", $4); print "%F{022}"$2":%F{green}"$4}'; done <<<"$( ip -d -o link sh |