Describe the bug
Since OpenSSH 9.0, scp uses the sftp protocol by default, so it only needs single escaping.
To reproduce
- Complete a remote filename destination which needs escaping, e.g.
my file.pdf
- Spaces in the remote filename get completed as
\\\ , e.g. remote:my\\\ file.pdf
- When executed, the local file gets copied to a remote file named
my\ file.pdf instead of my file.pdf
Expected behavior
Special characters in the remote filename get completed using a single backslash, e.g. remote:my\ file.pdf
Versions (please complete the following information)
Additional context
Passing -O to scp uses the old method, thus still requiring double escaping.
Debug trace
I don't think one is needed for this issue.
Describe the bug
Since OpenSSH 9.0, scp uses the sftp protocol by default, so it only needs single escaping.
To reproduce
my file.pdf\\\, e.g.remote:my\\\ file.pdfmy\ file.pdfinstead ofmy file.pdfExpected behavior
Special characters in the remote filename get completed using a single backslash, e.g.
remote:my\ file.pdfVersions (please complete the following information)
echo "$BASH_VERSION": 5.3.8(1)-release(IFS=.; echo "${BASH_COMPLETION_VERSINFO[*]}"): 2.17.0Additional context
Passing
-Oto scp uses the old method, thus still requiring double escaping.Debug trace
I don't think one is needed for this issue.