vim-arsync icon indicating copy to clipboard operation
vim-arsync copied to clipboard

Using remote_options with multiple flags to rsync causes rsync to fail.

Open AniAggarwal opened this issue 2 years ago • 3 comments

Example configs that fail:

remote_or_local remote
remote_options  -vazre --existing

remote_or_local remote
remote_options  -vazr --existing -e

Seems the issue with that rsync interperts the -vazr --existing -e as one single option. On the other hand, using -vazre --existing makes rsync think that the command it is executing (after the -e flag) is --existing which causes it to fail as well.

This looks like it may need a fair amount of work needed to process the flags and then place them in the cmd variable separately to ensure they are passed to rsync correctly. Let me know if I am not understanding the problem. If there is interest, I can look into making this work.

EDIT: Actually, after some more experimenting with rsync it seems all we need to do is remove a -e flag in the remote_options input and then throw the -e on after the options, just before ssh -p PORT. I'm not sure, however, if we will need to split something like --existing -e -vaz -r --progress into [--existing, -vaz, -r, --progress] before adding -e 'ssh -p PORT' ....

AniAggarwal avatar Apr 06 '23 16:04 AniAggarwal