Some cleaning, adds bashrc for those who don't want / can't install zsh
This commit is contained in:
16
bin/vim-recover
Executable file
16
bin/vim-recover
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Check recovery directory from vim
|
||||
if [ -f $1 ]; then
|
||||
echo >&2 Cannot recover an existing file...
|
||||
return 1
|
||||
fi
|
||||
|
||||
backup_path=~/.nvim/backups/`echo $PWD/$1 | tr '/' '%'`
|
||||
|
||||
if [ ! -f "$backup_path" ]; then
|
||||
echo >&2 Backup not found...
|
||||
return 2
|
||||
fi
|
||||
|
||||
cp $backup_path $1
|
||||
Reference in New Issue
Block a user