From 964934bc0d12618a57610b9695814899e15307ce Mon Sep 17 00:00:00 2001 From: Von Random Date: Wed, 8 Mar 2023 19:30:45 +0200 Subject: [PATCH] fish: ERR trap --- cli/.config/fish/config.fish | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cli/.config/fish/config.fish b/cli/.config/fish/config.fish index 4fe2b37..a44c822 100644 --- a/cli/.config/fish/config.fish +++ b/cli/.config/fish/config.fish @@ -1,4 +1,11 @@ if status is-interactive + function postexec --on-event fish_postexec + set -l ret $status + if test $ret -ne 0 + printf '\e[31m>>\e[39m exit \e[31m%s\e[39m\n' $ret + end + end + set -l grc_cmds \ iptables ipneighbor ipaddr iproute ip nmap netstat \ traceroute tcpdump ss ping \