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

Escaping of remote filenames containing spaces is broken for rsync #1255

Open
omgold opened this issue Oct 25, 2024 · 2 comments
Open

Escaping of remote filenames containing spaces is broken for rsync #1255

omgold opened this issue Oct 25, 2024 · 2 comments

Comments

@omgold
Copy link

omgold commented Oct 25, 2024

Describe the bug

If I want to copy a file from remote to local containing spaces, the space will be escaped with triple backslashes, but it should be only one.

To reproduce

If there is a named test file.txt when I try to complete

rsync localhost:test

I get the completion

rsync localhost:test\\\ file.txt

which doesn't work.

Expected behavior

It should be

rsync localhost:test\ file.txt

Versions (please complete the following information)

  • [ x] Operating system name/distribution and version: Arch
  • [ x] bash version, echo "$BASH_VERSION": 5.2.37(1)-release
  • [ x] bash-completion version, (IFS=.; echo "${BASH_COMPLETION_VERSINFO[*]}"): 2.14.0
@yedayak
Copy link
Collaborator

yedayak commented Oct 25, 2024

Hi, what version of rsync are you using?
This should be fixed on the main branch, see this pr.
Can you try using the main branch and see if it works for you?

@omgold
Copy link
Author

omgold commented Oct 25, 2024

Okay tried it. It seems to be fix only partially, though.

It still misbehaves when there are 2 files present, test file.txt and test\ file.txt.

If I then try to complete

rsync localhost:test

at the first tab press I get

rsync localhost:test\

but on subsequent presses, I get no choices to pick from at all.

I'm using rsync 3.3.0

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

No branches or pull requests

2 participants