projects
/
feisty_meow.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
784ac42
)
handy little retval alias describes return value
author
Fred T. Hamster
<fred@gruntose.com>
Mon, 11 Nov 2024 16:23:00 +0000
(11:23 -0500)
committer
Fred T. Hamster
<fred@gruntose.com>
Mon, 11 Nov 2024 16:23:00 +0000
(11:23 -0500)
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
patch
|
blob
|
history
diff --git
a/scripts/core/common.alias
b/scripts/core/common.alias
index 5fefd23bbe0508b2845fc7f5d92d4e861cc12d2a..ed7bc6e57cded0f77978c3ce1ff1e5f98ead0d5a 100644
(file)
--- 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 ..'
##############