From 883181f8a8212c8d749cb0359f2d506cbf928e3f Mon Sep 17 00:00:00 2001 From: Peter Date: Tue, 1 Feb 2022 20:56:29 +0000 Subject: Replace pv backup with more robust variant --- .config/fish/config.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.config/fish') diff --git a/.config/fish/config.fish b/.config/fish/config.fish index 15bbaf7..30e273c 100644 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -39,7 +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 backup; tar -zcvf (basename $argv)_backup-(date +%F-%H%M%S).tar.gz $argv ; 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