diff --git a/zshrc b/zshrc index 8e8e9c3..ae956a3 100644 --- a/zshrc +++ b/zshrc @@ -344,8 +344,11 @@ function ippub() #Récupère l'adresse IP (privee) function ippriv() { - printf 'eth0: %s\n' $(ip a s eth0|grep "inet "|awk '{print $2}') - printf 'wlan0: %s\n' $(ip a s wlan0|grep "inet "|awk '{print $2}') + for interface in $(find /sys/class/net/ ! -name lo -type l -printf "%f\n" | sort); + do + IP_INTER=$(ip a s ${interface}|grep "inet "|awk '{print $2}') + printf '%b' "${WHITEB}${interface}${RESET}: ${IP_INTER}\n" + done }