diff options
author | Peter | 2022-02-01 20:56:29 +0000 |
---|---|---|
committer | Peter | 2022-02-01 20:56:29 +0000 |
commit | 883181f8a8212c8d749cb0359f2d506cbf928e3f (patch) | |
tree | d712da004e388a081f7a8920f1e81747c5946348 | |
parent | 5f3d6ba34bbd38c2cd1042c4ac1edb54cf723f18 (diff) | |
download | dotfiles-883181f8a8212c8d749cb0359f2d506cbf928e3f.tar.gz dotfiles-883181f8a8212c8d749cb0359f2d506cbf928e3f.tar.bz2 dotfiles-883181f8a8212c8d749cb0359f2d506cbf928e3f.zip |
Replace pv backup with more robust variant
-rw-r--r-- | .config/fish/config.fish | 2 |
1 files changed, 1 insertions, 1 deletions
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 |