mirror of
https://github.com/gwebu-team/profile.d.git
synced 2025-12-09 12:05:46 +00:00
Fix ip color on EL 7.
iproute2 on EL 7 (ip utility, iproute2-ss170501) does not support --color=auto, only -c[olor]. Signed-off-by: Doncho N. Gunchev <dgunchev@gmail.com>
This commit is contained in:
parent
dc0be5c2a1
commit
9026bf704e
1 changed files with 7 additions and 1 deletions
|
|
@ -13,4 +13,10 @@ alias lll='ls -Al "--time-style=+%Y-%m-%d %H:%M:%S %4Z"'
|
|||
alias less='less -R'
|
||||
|
||||
# color ip route
|
||||
alias ip='ip --color=auto'
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue