Created
October 26, 2020 15:55
-
-
Save timwright12/2f05cb39313152fb4db53cda514a7cd7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
runCmd() { | |
echo "" | |
echo ">>> $@" | |
echo "" | |
eval "$@" | |
local code=$? | |
[[ $code -ne 0 ]] && return $code | |
} | |
named-command() { | |
local YELLOW='\033[0;33m' | |
local GREEN='\033[0;32m' | |
local NC='\033[0m' # No Color | |
echo -e "${YELLOW}Yellow message${NC}" | |
runCmd "cd items/" | |
} | |
eval $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment