From 9a10caef32108c3edbfb33cff4e19b26742db48e Mon Sep 17 00:00:00 2001 From: "Fred T. Hamster" Date: Mon, 11 Nov 2024 11:23:00 -0500 Subject: [PATCH] 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. --- scripts/core/common.alias | 1 + 1 file changed, 1 insertion(+) 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 ..' ############## -- 2.34.1