Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] remote files completion: remove double-escaping



On 2024-04-12 20:59, Bart Schaefer wrote:
On Wed, Apr 10, 2024 at 11:45 AM Mikael Magnusson <mikachu@xxxxxxxxx> wrote:

On Wed, Apr 10, 2024 at 12:47 PM Lyn Fugmann <me@xxxxxxxx> wrote:

Removes the double escaping in the remote files completion. This affects rsync and scp.
For example, instead of a space character in a remote filename turning into `\\\ `, it will now correctly turn into `\ `.
While scp apparently works with either one, rsync requires the latter since version 3.2.4[1] (unless the legacy behavior is explicitly enabled).
This has been a problem for almost two years now.

This should probably be behind a zstyle (I guess it's fine if it
defaults to the new behavior), as currently this patch will break
completion for older versions of scp and rsync. That way users can
easily configure it per command or globally if they want.

Doesn't this actually depend on the remote version rather than the
local command?  Might need to be configurable based on the
destination?

See also thread starting with workers/50484 from 2022 Subject: rsync completions

I finally got around to testing this. The behavior appears to depend only on the local version of rsync, not on the remote version. Tested using local rsync 3.2.3 and 3.2.7, remote rsync 3.1.3 and 3.2.7. So I think the patch should be fine as is. (I would expect very few people to run an over two years old version of rsync and a recent version of zsh on the same local machine.)




Messages sorted by: Reverse Date, Date, Thread, Author