From 33d86fd6b3e0f7fdc5ef26db323b5466a0d4cd8c Mon Sep 17 00:00:00 2001 From: Peter Date: Sun, 26 Dec 2021 00:58:29 +0000 Subject: Crude directory backup function --- .config/fish/config.fish | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/fish/config.fish b/.config/fish/config.fish index 9737c69..15bbaf7 100644 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -39,6 +39,7 @@ alias todo='$EDITOR (find "$SYNCDIR" -maxdepth 5 -type f -name 'todo.txt')' alias vaultedit='find "$SYNCDIR" -maxdepth 5 -type f | fzf --preview "cat {}" --layout reverse | xargs -r -I{} "$EDITOR" "{}"' # Functions +function backupdir; tar -cf - "$argv" -P | pv -s (du -sb "$argv" | awk '{print $1}') | gzip > "$argv"_backup-(date +%F-%H%M).tar.gz ; end function cheat; curl -s "http://cheat.sh/$argv"; end function fractodec; math -s2 "$argv" ; end function hextodec; math "0x$argv" ; end -- cgit v1.2.3