Browse Source

.vim/hooks/pre-session-save: Delete older than 30 days

master
tdro 4 months ago
parent
commit
5e4fafad8c
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      .vim/hooks/pre-session-save

+ 4
- 3
.vim/hooks/pre-session-save View File

@@ -1,3 +1,4 @@
#!/bin/sh

cp $HOME/.vim/sessions/session.vim $HOME/.vim/sessions/session-$(date +%d-%b-%Y-%H:%M:%S).vim
#!/bin/sh -eu
cd "$HOME/.vim/sessions" || exit 1
cp session.vim "session-$(date +%d-%b-%Y-%H:%M:%S).vim"
find ./*.vim -type f -mtime +31 -delete

Loading…
Cancel
Save