From: Fred T. Hamster Date: Mon, 11 Nov 2024 16:23:00 +0000 (-0500) Subject: handy little retval alias describes return value X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=9a10caef32108c3edbfb33cff4e19b26742db48e;p=feisty_meow.git handy little retval alias describes return value used after a previous command if output wasn't obvious enough, or just to check findings of exit value from last command. --- diff --git a/scripts/core/common.alias b/scripts/core/common.alias index 5fefd23b..ed7bc6e5 100644 --- a/scripts/core/common.alias +++ b/scripts/core/common.alias @@ -102,6 +102,7 @@ define_yeti_alias cd...='\cd ../..' define_yeti_alias cd....='\cd ../../..' define_yeti_alias cd.....='\cd ../../../..' define_yeti_alias np='gvim' +define_yeti_alias retval='errval=$?; if [ $errval -ne 0 ]; then echo "error code $errval occurred for last command."; else echo "all was well with last command."; fi' define_yeti_alias up='cd ..' ##############