From 0ec8d81216ad9531740cbeb91cbb35cc66925529 Mon Sep 17 00:00:00 2001 From: "Doncho N. Gunchev" Date: Fri, 26 Apr 2024 16:00:57 +0300 Subject: [PATCH] Don't add ip aliases on MacOS. --- etc/profile.d/z-aliases.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/etc/profile.d/z-aliases.sh b/etc/profile.d/z-aliases.sh index c9541af..796eb1a 100755 --- a/etc/profile.d/z-aliases.sh +++ b/etc/profile.d/z-aliases.sh @@ -10,19 +10,19 @@ if ! which ll 2>/dev/null; then alias ll='ls -l --color=auto' fi -if [[ "$OSTYPE" != darwin* ]]; then - # long format with ISO dates - alias lll='ls -Al "--time-style=+%Y-%m-%d %H:%M:%S %4Z"' -fi - # color less (restricted) alias less='less -R' -# color ip route -if ip -V | grep '^ip utility, iproute2-.*, libbpf' &>/dev/null; then - # EL 8+ - "ip utility, iproute2-6.2.0, libbpf 0.5.0" - alias ip='ip --color=auto' -else - # EL 7 - "ip utility, iproute2-ss170501" - alias ip='ip -c' +if [[ "$OSTYPE" != darwin* ]]; then + # long format with ISO dates + alias lll='ls -Al "--time-style=+%Y-%m-%d %H:%M:%S %4Z"' + + # color ip route + if ip -V | grep '^ip utility, iproute2-.*, libbpf' &>/dev/null; then + # EL 8+ - "ip utility, iproute2-6.2.0, libbpf 0.5.0" + alias ip='ip --color=auto' + else + # EL 7 - "ip utility, iproute2-ss170501" + alias ip='ip -c' + fi fi