From 1367d29f052f6d5ee22e6afaa0fcc7cf1346a724 Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Thu, 11 Oct 2018 08:03:27 +0200 Subject: [PATCH] Dont exit but return instead --- zsh/functions.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zsh/functions.zsh b/zsh/functions.zsh index 2ff3ad3..e88c794 100644 --- a/zsh/functions.zsh +++ b/zsh/functions.zsh @@ -46,14 +46,14 @@ vfind() { recover() { if [ -f $1 ]; then echo >&2 Cannot recover an existing file... - exit 1 + return 1 fi BACKUP_PATH=~/.vim/backups/`echo $PWD/$1 | tr '/' '%'` if [ ! -f "$BACKUP_PATH" ]; then echo >&2 Backup not found... - exit 2 + return 2 fi cp $BACKUP_PATH $1