Bug 1648170 - completion of command options in bash renders text with red background
Summary: completion of command options in bash renders text with red background
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: bash-completion
Version: 37
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ---
Assignee: Siteshwar Vashisht
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-09 02:07 UTC by Ivan Font
Modified: 2023-12-05 20:58 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2023-12-05 20:58:36 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Animated GIF showing bash tab command completion flashing red (3.30 MB, image/gif)
2018-11-09 02:07 UTC, Ivan Font
no flags Details

Description Ivan Font 2018-11-09 02:07:41 UTC
Created attachment 1503538 [details]
Animated GIF showing bash tab command completion flashing red

Description of problem:
In Bash, when using tab completion for command options, the options are displayed in bold red (background) with grey (foreground) and flashing at you resembling an error, making it very difficult to see any of the completion options. See image for example.

I've disabled everything in my .bash_profile (except for sourcing ~/.bashrc) and .bashrc (except for sourcing /etc/bashrc) to verify it wasn't a local user environment problem and the problem persists. When I 'sudo -i` as root, the problem goes away and the tab completion command options show up as regular text as expected. So something is amiss with the user environment verses root environment.

It's almost as if this command completion problem is using the 'MISSING 01;05;37;41' value from /etc/DIR_COLORS because the colors used resemble a non-existent file pointed to by a symbolic link (visible when you type ls -l).

I believe I started noticing this after upgrading from F27 to F28 over the weekend. I've been using the upgrade feature since F23 and have never really had any issues. I'm wondering if upgrading to F29 would fix it, but I suspect a fresh install of F28 or F29 would certainly fix it. But I'd like to avoid doing that for *reasons*.


Version-Release number of selected component (if applicable):


How reproducible:
I suspect upgrading from F27 to F28 would reproduce this but considering I've not seen any bugs related to this, it's likely not very reproducible.


Steps to Reproduce:
1. Install F27
2. Upgrade to F28
3. Test bash command completion

Actual results:
Bash tab command completions are displayed in bold red (background) with grey (foreground) and flashing at you resembling an error.


Expected results:
gnome-terminal color scheme for regular text.


Additional info:

Comment 1 Kamil Dudka 2018-11-09 08:45:38 UTC
Looks like a duplicate of bug #1592077.

Comment 2 Ivan Font 2018-11-09 16:12:37 UTC
Ah, yes thanks for pointing that out. I tried searching for any bugs filed around this but was not successful. Do you know what the fix is or if there is a workaround? Your last comment suggests filing something in Fedora devel. I'm trying to search there but the website is going very slow.

Comment 3 Kamil Dudka 2018-11-09 16:22:19 UTC
Bug #1592077 comment #13 was about the discussion whether or not it is suitable to use blinking text for dangling symlinks in dircolors.  Unfortunately, I do not know much about the bash-completion vs. some terminals issue that causes the bash completion text to blink for no apparent reason.

Comment 4 Ivan Font 2019-04-08 05:31:01 UTC
This appears to be caused by setting 'set colored-stats' in ~/.inputrc. It correctly displays possible completions using different colors to indicate their file type. But when dealing with command option completions, it flashes them and highlights them with red background and white foreground as shown in the animated gif.

Comment 5 Ivan Font 2019-04-08 05:32:13 UTC
This is still a problem in Fedora 29 and I've updated the bug accordingly.

Comment 6 Kamil Dudka 2019-04-08 10:09:45 UTC
(In reply to Ivan Font from comment #4)
> This appears to be caused by setting 'set colored-stats' in ~/.inputrc.

Thanks!  The above reproducer works for me.  There are actually multiple issues going on:

1. bash-completion makes readline think it is completing file names, which is not the case for option completion, for example:

    $ ls --<TAB><TAB>

2. readline uses the C_MISSING color code to highlight files that do not exist, whereas coreutils uses the code to highlight symlink targets that do not exist.

3. coreutils in Fedora uses a downstream patch to highlight non-existing targets of symlinks.  This should be easy to revert for a user:

    $ echo 'LS_COLORS=${LS_COLORS/mi=01;05;37;41:/mi=00:}' >> ~/.bashrc

Comment 7 Carl George 🤠 2019-04-24 12:47:41 UTC
I worked around this by editing /etc/DIR_COLORS.256color.

-MISSING 01;05;37;41 # ... and the files they point to
+MISSING 01;37 # ... and the files they point to

Removing 05 takes away the blinking, and removing 41 removes the red background.  The rest of the codes are documented in the comments of that file.  That file is marked as config(noreplace) in the spec file so the change should be persistent.  Broken symlinks are still obvious from the ORPHAN setting (red text, black non-transparent background) without the annoying blinking red.

Comment 8 Kamil Dudka 2019-04-24 13:19:00 UTC
(In reply to Carl George from comment #7)
> I worked around this by editing /etc/DIR_COLORS.256color.

Yes, this also works if you have root access.

Comment 9 Kamil Dudka 2019-04-24 13:20:19 UTC
Note that different terminals may pick different /etc/DIR_COLORS* files.

Comment 10 Kamil Dudka 2019-08-09 13:15:36 UTC
Starting with coreutils-8.31-3.fc31 it should at least not blink by default.  See bug #1728986 for details.

Comment 11 Ben Cotton 2019-10-31 18:58:05 UTC
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
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
Fedora 'version' of '29'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 29 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, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 12 Ben Cotton 2019-11-27 23:11:57 UTC
Fedora 29 changed to end-of-life (EOL) status on 2019-11-26. Fedora 29 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 13 Ivan Font 2019-12-02 20:55:15 UTC
This issue still exists with Fedora 31.

Comment 14 Kamil Dudka 2019-12-02 22:44:24 UTC
I believe that the flashing was eliminated per bug #1728986.  Could you please retest and eventually provide self-contained steps to reproduce it?

Comment 15 Ivan Font 2019-12-03 00:54:16 UTC
Yes, the flashing was eliminated, but the red background with white foreground persists. Is this expected? It used to be just the same color as the normal text selected for the terminal.

The same steps captured in one of my previous comments still works to reproduce it. I've summarized and recaptured below for convenience:

1. Install F31
2. Setting 'set colored-stats' in ~/.inputrc.
3. Open new gnome-terminal

Comment 16 Ivan Font 2019-12-03 00:58:05 UTC
Added step 4 to actually show argument completion.

1. Install F31
2. Setting 'set colored-stats' in ~/.inputrc.
3. Open new gnome-terminal
4. tar --<tab> (y for displaying all possibilities.

Comment 17 Ivan Font 2019-12-03 00:58:35 UTC
Added step 4 to actually show argument completion.

1. Install F31
2. Setting 'set colored-stats' in ~/.inputrc.
3. Open new gnome-terminal
4. tar --<tab> (y for displaying all possibilities).

Comment 18 Kamil Dudka 2019-12-03 08:46:00 UTC
OK, thanks for the update!  The underlying cause is described in comment #6.  Per bug #1728986, problem 3. has been resolved in the coreutils package.  The remaining problems need to be addressed in bash-completion.

Comment 19 Ben Cotton 2020-11-03 17:21:30 UTC
This message is a reminder that Fedora 31 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 31 on 2020-11-24.
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
Fedora 'version' of '31'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 31 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, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 20 Ben Cotton 2020-11-24 20:15:41 UTC
Fedora 31 changed to end-of-life (EOL) status on 2020-11-24. Fedora 31 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 21 Ivan Font 2020-12-01 06:56:47 UTC
Issue still exists in Fedora 32. To reproduce:

1. Install F32
2. Setting 'set colored-stats' in ~/.inputrc.
3. Open new gnome-terminal
4. tar --<tab> (y for displaying all possibilities).

Comment 22 Fedora Program Management 2021-04-29 17:15:02 UTC
This message is a reminder that Fedora 32 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 32 on 2021-05-25.
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
Fedora 'version' of '32'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 32 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, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 23 Ben Cotton 2021-05-25 18:12:13 UTC
Fedora 32 changed to end-of-life (EOL) status on 2021-05-25. Fedora 32 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 24 Ivan Font 2021-05-26 15:53:49 UTC
Issue still exists in Fedora 33. To reproduce:

1. Install F33
2. Setting 'set colored-stats' in ~/.inputrc.
3. Open new gnome-terminal
4. tar --<tab> (y for displaying all possibilities).

Comment 25 Ben Cotton 2021-11-04 13:58:20 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
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
Fedora 'version' of '33'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 33 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, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 26 Ben Cotton 2021-11-04 14:27:41 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
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
Fedora 'version' of '33'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 33 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, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 27 Ben Cotton 2021-11-04 15:25:21 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
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
Fedora 'version' of '33'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 33 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, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 28 Ben Cotton 2021-11-30 18:50:14 UTC
Fedora 33 changed to end-of-life (EOL) status on 2021-11-30. Fedora 33 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 29 Ivan Font 2021-12-01 20:51:33 UTC
Issue still exists in Fedora 34. To reproduce:

1. Install F34
2. Setting 'set colored-stats' in ~/.inputrc
3. Open new gnome-terminal
4. ls --<tab>

Comment 30 Ben Cotton 2022-05-12 16:55:33 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 31 Ben Cotton 2022-06-08 06:28:32 UTC
Fedora Linux 34 entered end-of-life (EOL) status on 2022-06-07.

Fedora Linux 34 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 32 Ivan Font 2022-06-08 19:34:10 UTC
Issue still exists in Fedora 35. To reproduce:

1. Install F35
2. Setting 'set colored-stats' in ~/.inputrc
3. Open new gnome-terminal
4. ls --<tab>

Comment 33 Ben Cotton 2022-11-29 16:45:52 UTC
This message is a reminder that Fedora Linux 35 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 35 on 2022-12-13.
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 '35'.

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 35 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 34 Ivan Font 2022-11-29 21:11:58 UTC
Issue still exists in Fedora 36. To reproduce:

1. Install F36
2. Setting 'set colored-stats' in ~/.inputrc
3. Open new gnome-terminal
4. ls --<tab>

Comment 35 Ben Cotton 2022-12-13 15:12:39 UTC
Fedora Linux 35 entered end-of-life (EOL) status on 2022-12-13.

Fedora Linux 35 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 36 Kamil Dudka 2022-12-13 15:49:25 UTC
Reopening per comment #34.

Comment 37 Ben Cotton 2023-04-25 18:21:53 UTC
This message is a reminder that Fedora Linux 36 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 36 on 2023-05-16.
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 '36'.

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. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 36 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 38 Ludek Smid 2023-05-25 19:31:57 UTC
Fedora Linux 36 entered end-of-life (EOL) status on 2023-05-16.

Fedora Linux 36 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 39 Ivan Font 2023-05-30 21:17:57 UTC
Issue still exists in Fedora 37. To reproduce:

1. Install F37
2. Setting 'set colored-stats' in ~/.inputrc
3. Open new gnome-terminal
4. ls --<tab>

Comment 40 Aoife Moloney 2023-11-23 00:01:56 UTC
This message is a reminder that Fedora Linux 37 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 37 on 2023-12-05.
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 '37'.

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. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 37 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 41 Aoife Moloney 2023-12-05 20:58:36 UTC
Fedora Linux 37 entered end-of-life (EOL) status on None.

Fedora Linux 37 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.


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