Dont exit but return instead
This commit is contained in:
parent
0ab00d3c36
commit
1367d29f05
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue