Dont exit but return instead
This commit is contained in:
parent
0ab00d3c36
commit
1367d29f05
|
@ -46,14 +46,14 @@ vfind() {
|
||||||
recover() {
|
recover() {
|
||||||
if [ -f $1 ]; then
|
if [ -f $1 ]; then
|
||||||
echo >&2 Cannot recover an existing file...
|
echo >&2 Cannot recover an existing file...
|
||||||
exit 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
BACKUP_PATH=~/.vim/backups/`echo $PWD/$1 | tr '/' '%'`
|
BACKUP_PATH=~/.vim/backups/`echo $PWD/$1 | tr '/' '%'`
|
||||||
|
|
||||||
if [ ! -f "$BACKUP_PATH" ]; then
|
if [ ! -f "$BACKUP_PATH" ]; then
|
||||||
echo >&2 Backup not found...
|
echo >&2 Backup not found...
|
||||||
exit 2
|
return 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cp $BACKUP_PATH $1
|
cp $BACKUP_PATH $1
|
||||||
|
|
Loading…
Reference in New Issue