Fixed bizarre exit behaviour

This commit is contained in:
Wryn Wagner 2020-01-06 11:10:17 -07:00
parent 24c639d498
commit ef932618e3
2 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@ function new_dmenu_command() {
local DMENU_BIN="$HOME/.local/custom_dmenu";
# fail withouut both arguments
[ ! $2 ] && exit 1;
[ ! $2 ] && return 1;
echo "${@:2}"
echo "${@:2}" > $DMENU_BIN/$1 2>/dev/null

View File

@ -19,7 +19,7 @@ alias classes="echo; cat $SCHOOL_DIR/.classes | lolcat; echo";
HW_TEMPLATE="$DOTWRYN/latex/homework_template.tex"
function hw() {
# Make new homework .tex from default template
[ ! $1 ] && echo "Homework filename required" && exit 1;
[ ! $1 ] && echo "Homework filename required" && return 1;
NEW_HW="./$1.tex";
[ ! -f $NEW_HW ] && cp $HW_TEMPLATE $NEW_HW;