Hello, Starting with bash-completion-2.14.0, rsync completion fails if a folder name have a space. mkdir ab ac rsync a [hit tab] ab/ ac/ -> works as expected mkdir "a b" "a c" rsync a [hit tab] [no output] -> fails If I add a folder without space -ad- : mkdir "a b" "a c" ad rsync a [hit tab] a\ b/ a\ c/ ad/ Then it shows the choices as you can see but then if I type the backslash (thinking it would show a\ b/ & a\ c/) : Code: rsync a\ [hit tab] -> no completion [no output] ---- I can't downgrade to bash-completion-2.11 since it has already been removed from tree. So I chrooted in an old snapshot (from two months ago with version 2.11), and : mkdir "a b" "a c" rsync a [hit tab] a\ b/ a\ ac/ mkdir "a b" "a c" ad rsync a [hit tab] a\ b/ a\ c/ ad/ No issue. All work as expected with 2.11. I can reproduce the issue with a debian testing chroot (it features bash-completion-2.14 too), so it doesn't look like a configuration issue on my system. Finally, this issue is only present with rsync completion. ls, cat (for example) for completion work fine, space or not. Reproducible: Always
Sorry, little typo : [...] So I chrooted in an old snapshot (from two months ago with version 2.11), and : [...] #a\ b/ a\ ac/ a\ b/ a\ c/
Ideally this should be reported to upstream as an issue. I'll try to look if I can find the miss, but better you report it.
(In reply to Arthur Zamarin from comment #2) > Ideally this should be reported to upstream as an issue. I'll try to look if > I can find the miss, but better you report it. Hello, just a little, hopefully useful info, I unmerged bash-completion and manually compiled & installed straight from git repo (latest commit) : https://github.com/scop/bash-completion (The 9999 ebuild fails to install right now) I ran again my test with "a b" "a c" and this time the rsync completion works. My knowledge of bash is limited so I can't tell which commit fixed it. (to eventually make a patch until new release)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eff4986d8bd2ee868edf18192102cc86262c1fdd commit eff4986d8bd2ee868edf18192102cc86262c1fdd Author: Arthur Zamarin <arthurzam@gentoo.org> AuthorDate: 2024-07-06 17:39:18 +0000 Commit: Arthur Zamarin <arthurzam@gentoo.org> CommitDate: 2024-07-06 17:40:16 +0000 app-shells/bash-completion: fix live ebuild Bug: https://bugs.gentoo.org/935658 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org> .../bash-completion/bash-completion-9999.ebuild | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-)
(In reply to David Duchesne from comment #3) > Hello, just a little, hopefully useful info, > I unmerged bash-completion and manually compiled & installed straight from > git repo (latest commit) : https://github.com/scop/bash-completion (The 9999 > ebuild fails to install right now) > > I ran again my test with "a b" "a c" and this time the rsync completion > works. > My knowledge of bash is limited so I can't tell which commit fixed it. (to > eventually make a patch until new release) Mmh, sorry when I installed manually, bash_completion.sh was not correctly installed. (It installs by default in /etc/profile.d ; which wasn't sourced) As soon as I correctly put it in /etc/bash/bashrc.d; then it fails again. I didn't realize it wasn't correctly installed first because I was using without rsync without argument. So back with the same error.. ~ mkdir "a b" "a c" ~ rsync -av a [hit tab] It adds a backslash to the command "rsync -av a\ " but hitting tab again fails to show : a\ b/ a\ c/ Now the 9999 is fixed, it will be easier to test, thanks. I'll have a look on how to report that on github even though I'm not feeling really comfortable about it.
https://github.com/scop/bash-completion/issues/1232