mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-26 21:22:00 +03:00
Merge remote-tracking branch 'lenormf/rc/autorestore.kak'
This commit is contained in:
commit
6916b65dfe
@ -21,7 +21,7 @@ def autorestore-restore-buffer -docstring "Restore the backup for the current fi
|
|||||||
## Replace the content of the buffer with the content of the backup file
|
## Replace the content of the buffer with the content of the backup file
|
||||||
echo "
|
echo "
|
||||||
exec -draft %{ %d!cat<space>${latest_backup_path}<ret>d }
|
exec -draft %{ %d!cat<space>${latest_backup_path}<ret>d }
|
||||||
echo -color Information Backup restored
|
echo -color Information 'Backup restored'
|
||||||
"
|
"
|
||||||
|
|
||||||
## If the backup file has to be removed, issue the command once
|
## If the backup file has to be removed, issue the command once
|
||||||
@ -50,7 +50,7 @@ def autorestore-purge-backups -docstring "Remove all the backups of the current
|
|||||||
|
|
||||||
find "${buffer_dirname}" -maxdepth 1 -type f -readable -name "\.${buffer_basename}\.kak\.*" -delete 2>/dev/null
|
find "${buffer_dirname}" -maxdepth 1 -type f -readable -name "\.${buffer_basename}\.kak\.*" -delete 2>/dev/null
|
||||||
}
|
}
|
||||||
echo -color 'Information Backup files removed'
|
echo -color Information 'Backup files removed'
|
||||||
}
|
}
|
||||||
|
|
||||||
## If for some reason, backup files need to be ignored
|
## If for some reason, backup files need to be ignored
|
||||||
|
Loading…
Reference in New Issue
Block a user