summaryrefslogtreecommitdiffstats
path: root/.config
diff options
context:
space:
mode:
authorPeter2021-12-26 00:58:29 +0000
committerPeter2021-12-26 00:58:29 +0000
commit33d86fd6b3e0f7fdc5ef26db323b5466a0d4cd8c (patch)
treeb016547ff8a7a3d302a92a6e082aff010260ec90 /.config
parente6c17d7cfca6c0cfcb03992b696dd40b0de39b6c (diff)
downloaddotfiles-33d86fd6b3e0f7fdc5ef26db323b5466a0d4cd8c.tar.gz
dotfiles-33d86fd6b3e0f7fdc5ef26db323b5466a0d4cd8c.tar.bz2
dotfiles-33d86fd6b3e0f7fdc5ef26db323b5466a0d4cd8c.zip
Crude directory backup function
Diffstat (limited to '.config')
-rw-r--r--.config/fish/config.fish1
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