From 1210a4b2ed9a0b10be90140b59e01acfcb5d40d5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 28 Feb 2021 09:42:26 -0500 Subject: [PATCH] Split up rsync aliases & improve comments --- config/zsh/aliases.zsh | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/config/zsh/aliases.zsh b/config/zsh/aliases.zsh index 564370e5..060b08f6 100644 --- a/config/zsh/aliases.zsh +++ b/config/zsh/aliases.zsh @@ -21,15 +21,27 @@ alias gurl='curl --compressed' alias shutdown='sudo shutdown' alias reboot='sudo reboot' -# A rsync that respects gitignore +# An rsync that respects gitignore rcp() { - rsync -azPJ --delete --delete-after \ + # -a = -rlptgoD + # -r = recursive + # -l = copy symlinks as symlinks + # -p = preserve permissions + # -t = preserve mtimes + # -g = preserve owning group + # -o = preserve owner + # -z = use compression + # -P = show progress on transferred file + # -J = don't touch mtimes on symlinks (always errors) + rsync -azPJ \ --include=.git/ \ --filter=':- .gitignore' \ --filter=":- $XDG_CONFIG_HOME/git/ignore" \ "$@" }; compdef rcp=rsync -rcpu() { rcp --chmod=go= "$@" } +alias rcpd='rcp --delete --delete-after' +alias rcpu='rcp --chmod=go=' +alias rcpdu='rcpd --chmod=go=' alias y='xclip -selection clipboard -in' alias p='xclip -selection clipboard -out'