If you write a variable name as part of a file path, and if the file path also contains a component whose name includes a space, then auto-completing this file path will insert a '\' before the '$' of the variable name, and the file path becomes invalid. $ rpm -q bash bash-completion bash-5.1.0-2.fc34.x86_64 package bash-completion is not installed $ shopt -u direxpand $ mkdir -p $HOME/xyzzy/'foo bar'/baz $ ls $HOME/xyz[TAB] $ ls $HOME/xyzzy/foo[TAB] $ ls \$HOME/xyzzy/foo\ bar/ ls: cannot access '$HOME/xyzzy/foo bar/': No such file or directory
This message is a reminder that Fedora Linux 34 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 34 on 2022-06-07. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '34'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 34 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed.
With bash-5.1.16-2.fc36.x86_64 the same applies.
This bug was fixed in upstream through this commit[1]. It should be fixed during next rebase. [1] https://git.savannah.gnu.org/cgit/bash.git/diff/?h=devel&id=be7fc0525eb4932c931a45026a20aa483d7bc671