diff options
author | Peter | 2021-12-26 00:58:29 +0000 |
---|---|---|
committer | Peter | 2021-12-26 00:58:29 +0000 |
commit | 33d86fd6b3e0f7fdc5ef26db323b5466a0d4cd8c (patch) | |
tree | b016547ff8a7a3d302a92a6e082aff010260ec90 /.config | |
parent | e6c17d7cfca6c0cfcb03992b696dd40b0de39b6c (diff) | |
download | dotfiles-33d86fd6b3e0f7fdc5ef26db323b5466a0d4cd8c.tar.gz dotfiles-33d86fd6b3e0f7fdc5ef26db323b5466a0d4cd8c.tar.bz2 dotfiles-33d86fd6b3e0f7fdc5ef26db323b5466a0d4cd8c.zip |
Crude directory backup function
Diffstat (limited to '.config')
-rw-r--r-- | .config/fish/config.fish | 1 |
1 files changed, 1 insertions, 0 deletions
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 |