Fixed bizarre exit behaviour
This commit is contained in:
parent
24c639d498
commit
ef932618e3
@ -9,7 +9,7 @@ function new_dmenu_command() {
|
|||||||
local DMENU_BIN="$HOME/.local/custom_dmenu";
|
local DMENU_BIN="$HOME/.local/custom_dmenu";
|
||||||
|
|
||||||
# fail withouut both arguments
|
# fail withouut both arguments
|
||||||
[ ! $2 ] && exit 1;
|
[ ! $2 ] && return 1;
|
||||||
|
|
||||||
echo "${@:2}"
|
echo "${@:2}"
|
||||||
echo "${@:2}" > $DMENU_BIN/$1 2>/dev/null
|
echo "${@:2}" > $DMENU_BIN/$1 2>/dev/null
|
||||||
|
@ -19,7 +19,7 @@ alias classes="echo; cat $SCHOOL_DIR/.classes | lolcat; echo";
|
|||||||
HW_TEMPLATE="$DOTWRYN/latex/homework_template.tex"
|
HW_TEMPLATE="$DOTWRYN/latex/homework_template.tex"
|
||||||
function hw() {
|
function hw() {
|
||||||
# Make new homework .tex from default template
|
# 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";
|
NEW_HW="./$1.tex";
|
||||||
[ ! -f $NEW_HW ] && cp $HW_TEMPLATE $NEW_HW;
|
[ ! -f $NEW_HW ] && cp $HW_TEMPLATE $NEW_HW;
|
||||||
|
Loading…
Reference in New Issue
Block a user