Split up rsync aliases & improve comments

This commit is contained in:
Henrik Lissner 2021-02-28 09:42:26 -05:00
parent 44d03e762a
commit 1210a4b2ed

View file

@ -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'