From abb59a6ec925ca3430433d0df619f9b7c06269c2 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Tue, 2 Feb 2021 06:36:28 +0100 Subject: [PATCH] Color "ip" output if available This is supported since iproute2 v4.19.0 Closes #5340 --- share/functions/ip.fish | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 share/functions/ip.fish diff --git a/share/functions/ip.fish b/share/functions/ip.fish new file mode 100644 index 000000000..6c94c3e52 --- /dev/null +++ b/share/functions/ip.fish @@ -0,0 +1,9 @@ +# +# Enable ip colored output if available +# + +if command -sq ip; and command ip -color=auto link >/dev/null 2>/dev/null + function ip + command ip -color=auto $argv + end +end