Bug 2026883 - Sometimes $ becomes \$ on tab completion
Summary: Sometimes $ becomes \$ on tab completion
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: bash
Version: 36
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Siteshwar Vashisht
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-11-26 11:01 UTC by Ian Collier
Modified: 2022-08-15 09:50 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-15 09:50:04 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ian Collier 2021-11-26 11:01:51 UTC
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

Comment 1 Ben Cotton 2022-05-12 16:34:48 UTC
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.

Comment 2 Ian Collier 2022-05-19 14:54:43 UTC
With bash-5.1.16-2.fc36.x86_64 the same applies.

Comment 3 Siteshwar Vashisht 2022-08-15 09:50:04 UTC
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


Note You need to log in before you can comment on or make changes to this bug.