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'