Dont exit but return instead

This commit is contained in:
Thomas Forgione 2018-10-11 08:03:27 +02:00
parent 0ab00d3c36
commit 1367d29f05
No known key found for this signature in database
GPG Key ID: 203DAEA747F48F41
1 changed files with 2 additions and 2 deletions

View File

@ -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