From ef932618e3920e2e6ae6080c94e59918aba158b1 Mon Sep 17 00:00:00 2001 From: Wryn Wagner Date: Mon, 6 Jan 2020 11:10:17 -0700 Subject: [PATCH] Fixed bizarre exit behaviour --- zsh/linux/dmenu_stuff | 2 +- zsh/school | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/zsh/linux/dmenu_stuff b/zsh/linux/dmenu_stuff index b734796..7ae6cf2 100644 --- a/zsh/linux/dmenu_stuff +++ b/zsh/linux/dmenu_stuff @@ -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 diff --git a/zsh/school b/zsh/school index 3d35fcf..decb150 100644 --- a/zsh/school +++ b/zsh/school @@ -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;