From 46d1f438d6dd24a220df93fa28e205c8c33ad505 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Fri, 7 Aug 2015 09:18:12 +0100 Subject: [PATCH] Style tweak in autorestore.kak --- rc/autorestore.kak | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rc/autorestore.kak b/rc/autorestore.kak index 678040a2..544d558e 100644 --- a/rc/autorestore.kak +++ b/rc/autorestore.kak @@ -13,10 +13,10 @@ def autorestore-restore-buffer -docstring "Restore the backup for the current fi ## The backup file has to have been last modified more recently than the file we are editing latest_backup_path=$(find "${buffer_dirname}" -maxdepth 1 -type f -readable -newer "${kak_bufname}" -name "\.${buffer_basename}\.kak\.*" -printf '%A@/%p\n' 2>/dev/null \ | sort -n -t. -k1 | sed -nr 's/^[^\/]+\///;$p') - test ! -z "${latest_backup_path}" || { + if [ -z "${latest_backup_path}" ]; then echo "eval -draft %{ autorestore-purge-backups }"; exit; - } + fi ## Replace the content of the buffer with the content of the backup file echo "