Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rsync ssh remote paths are double-escaped (incorrect since rsync 3.2.4) #848

Open
3 tasks done
stefanor opened this issue Nov 23, 2022 · 2 comments · May be fixed by #910
Open
3 tasks done

rsync ssh remote paths are double-escaped (incorrect since rsync 3.2.4) #848

stefanor opened this issue Nov 23, 2022 · 2 comments · May be fixed by #910

Comments

@stefanor
Copy link
Contributor

stefanor commented Nov 23, 2022

Describe the bug

In 3.2.4 rsync changed the default way that arguments were passed to a remote ssh host, to no longer require double-escaping.

The bash-completion still double-escapes.

To reproduce

  1. Create /tmp/foo bar on a remote machine (named remote)
  2. Type rsync remote:/tmp/foo
  3. Press tab.
  4. Note that this completes to rsync remote:/tmp/foo\\\ bar, which is incorrect.

Expected behaviour

The remote path should only be escaped once, not twice (unless the --old-args argument is passed to rsync (>= 3.2.4)

Versions (please complete the following information)

  • Operating system name/distribution and version: Debian testing
  • bash version, echo "$BASH_VERSION": 5.2.2(1)-release
  • bash-completion version, (IFS=.; echo "${BASH_COMPLETION_VERSINFO[*]}"): 2.11 (Debian: 1:2.11-6)
Rogach added a commit to Rogach/bash-completion that referenced this issue Mar 29, 2023
Fixes scop#848.

If a remote machine contains a file named `a b`, completing rsync
command results in `rsync remote:a\\\ b`, which results in rsync
failing to find the file.

This commit removes the extra slashes, and now completion results in
`rsync remote:a\ b`.

scp somehow accepts both variants, so this change won't break it.
Rogach added a commit to Rogach/bash-completion that referenced this issue Jun 18, 2023
Fixes scop#848.

If a remote machine contains a file named `a b`, completing rsync
command results in `rsync remote:a\\\ b`, which results in rsync
failing to find the file.

This commit removes the extra slashes, and now completion results in
`rsync remote:a\ b`.

scp somehow accepts both variants, so this change won't break it.
@amalgame21
Copy link

One year later the problem still there.

@jucor
Copy link

jucor commented Oct 8, 2023

Just got bitten by this. I'd be very grateful for this fix to be merged. Thank you :)

akinomyoga pushed a commit to Rogach/bash-completion that referenced this issue Oct 8, 2023
Fixes scop#848.

If a remote machine contains a file named `a b`, completing rsync
command results in `rsync remote:a\\\ b`, which results in rsync
failing to find the file.

This commit removes the extra slashes, and now completion results in
`rsync remote:a\ b`.

scp somehow accepts both variants, so this change won't break it.
akinomyoga pushed a commit to Rogach/bash-completion that referenced this issue May 13, 2024
Fixes scop#848.

If a remote machine contains a file named `a b`, completing rsync
command results in `rsync remote:a\\\ b`, which results in rsync
failing to find the file.

This commit removes the extra slashes, and now completion results in
`rsync remote:a\ b`.

scp somehow accepts both variants, so this change won't break it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants