[-- Attachment #1: Type: text/plain, Size: 1270 bytes --] Dear zsh-workers, A few months ago the zsh completions for rsync stopped working correctly. Tab completion of remote paths currently triple escapes special characters, for example: $ rsync -av 1.2.3.4:/home/me/downloads/Some\\\ File\\\ With\\\ Spaces ~/ This now results in an error, ie: rsync: link_stat "/home/me/downloads/Some\ File\ With\ Spaces" failed: No such file or directory (2) I have to manually correct the triple escapes to use a single escape like this for it to work: $ rsync -av 1.2.3.4:/home/me/downloads/Some\ File\ With\ Spaces ~/ After some research I found that rsync 3.2.4 introduced changes to argument parsing behavior¹ on 2022-04-15. This was patched by the fish shell² recently shortly after the rsync 3.2.4 release. Apologies if the zsh-workers is not the correct place to post this. I would appreciate any advice or assistance on this, for example if it's a distribution issue I will gladly file an issue elsewhere. I'm on Arch Linux with zsh 5.9 and rsync 3.2.5. Thank you! ¹ https://download.samba.org/pub/rsync/NEWS#3.2.4 ² https://github.com/fish-shell/fish-shell/issues/8895 -- Alan Orth alan.orth@gmail.com https://picturingjordan.com https://englishbulgaria.net https://mjanja.ch [-- Attachment #2: Type: text/html, Size: 2024 bytes --]
On Thu, Aug 18, 2022 at 11:08 AM Alan Orth <alan.orth@gmail.com> wrote:
>
> A few months ago the zsh completions for rsync stopped working correctly.
So if this is a problem introduced by those quoting changes in rsync
3.2.x, then the rsync completion has to become version-aware, which I
see is what fish has done.
I'm not able to tell what ramifications this has when the remote
version differs significantly from the local version; it doesn't
appear fish is taking that into account, so perhaps it doesn't matter.
A quick workaround for you, Alan, is likely to be
alias rsync='rsync --old-args'
There might even be a clever way to insert --old-args into $BUFFER
only when completion has been invoked, but completion widgets don't
play well with "ordinary" line edits so I'm not going there just now.
On 8/19/22, Bart Schaefer <schaefer@brasslantern.com> wrote: > On Thu, Aug 18, 2022 at 11:08 AM Alan Orth <alan.orth@gmail.com> wrote: >> >> A few months ago the zsh completions for rsync stopped working correctly. > > So if this is a problem introduced by those quoting changes in rsync > 3.2.x, then the rsync completion has to become version-aware, which I > see is what fish has done. From what I can tell from https://download.samba.org/pub/rsync/NEWS#3.2.4 the change is specifically in 3.2.4 which seems extremely user unfriendly to introduce such a breaking change in a micro revision. > I'm not able to tell what ramifications this has when the remote > version differs significantly from the local version; it doesn't > appear fish is taking that into account, so perhaps it doesn't matter. > > A quick workaround for you, Alan, is likely to be > alias rsync='rsync --old-args' > > There might even be a clever way to insert --old-args into $BUFFER > only when completion has been invoked, but completion widgets don't > play well with "ordinary" line edits so I'm not going there just now. -- Mikael Magnusson
[-- Attachment #1: Type: text/plain, Size: 359 bytes --] Hey Mikael and Bart, Thanks for the suggestion on a shell alias with `--old-args`. I tried `export RSYNC_OLD_ARGS=1` and it works as well. You are right that this is an unfortunate change for a minor point release. Not sure what zsh should do here. At least now there's some kind of record so users who are having this issue know what's happening. Regards, [-- Attachment #2: Type: text/html, Size: 471 bytes --]