RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1055784 - bash completion problem with nounset shell option
Summary: bash completion problem with nounset shell option
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: bash-completion
Version: 7.0
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Siteshwar Vashisht
QA Contact:
URL:
Whiteboard:
: 1309920 (view as bug list)
Depends On:
Blocks: 1203710 1298243 1420851
TreeView+ depends on / blocked
 
Reported: 2014-01-20 22:17 UTC by Orhan Biyiklioglu
Modified: 2021-12-10 14:24 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1309920 (view as bug list)
Environment:
Last Closed: 2018-10-31 14:34:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Debian BTS 632026 0 None None None Never
Red Hat Knowledge Base (Solution) 2851661 0 None None None 2017-01-09 15:29:59 UTC

Internal Links: 1452539

Description Orhan Biyiklioglu 2014-01-20 22:17:32 UTC
Description of problem:

Using bash shell option nounset either by "set -u" or "set -o nounset" will cause unbound variable errors while trying to use the bash auto-completion via the tab key.

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

bash-completion-2.1-7.el7.noarch

How reproducible:

Always

Steps to Reproduce:
1. set -u or set -o nounset
2. Type any command and hit the tab key
3. 

Actual results:

vi <TAB KEY HERE>-bash: !ref: unbound variable
-bash: !ref: unbound variable
-bash: words[i]: unbound variable
----
systemctl en<TAB KEY HERE>-bash: verb: unbound variable


Expected results:

Should bring a list of available files or complete the command parameter.

Additional info:

This has previously been reported here: 
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=313270&group_id=100114
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=632026

The same problem occurs on Fedora 20 as well.

Comment 4 saravana 2015-07-12 11:51:16 UTC
I am using ubuntu 14.04 with bash autocompletion - 2.1-7. I can't imagine using uninitialised environment variables, to avoid ending up in soup as, http://unix.stackexchange.com/questions/208184/issue-an-error-when-using-empty-shell-variables.
But adding it breaks bash autocompletion feature as it looks like, bash autocompletion lib has too many empty env. variables lying around...

Is there a fix available for this?

Comment 7 Noel McLoughlin 2016-02-19 17:40:24 UTC
*** Bug 1309920 has been marked as a duplicate of this bug. ***

Comment 13 David Kaspar // Dee'Kej 2016-05-20 09:21:41 UTC
Hello everyone,

current upstream (https://github.com/scop/bash-completion, see https://bugs.archlinux.org/task/11196 for more info) is aware of the issue:
https://wiki.debian.org/Teams/BashCompletion/Proposals/Roadmap (objectives for 3.0)

This means, it's not yet fixed in upstream yet. My colleague will be opening an issue for upstream in github.

Since we want to avoid any divergence from upstream, we will have to wait until upstream will fix this issue. After it is fixed, we can backport the patch then.

Thank you for your understanding and patience.

Best regards,

David

Comment 14 Siteshwar Vashisht 2016-05-24 09:13:20 UTC
https://github.com/scop/bash-completion/issues/44

Comment 20 Siteshwar Vashisht 2018-01-04 14:09:16 UTC
My initial impression was that this bug can be fixed with some changes, but it looks like it will require changing lot of code. There are many occurrences of using undeclared variables in bash-completion package. We should avoid backporting such big changes into rhel as they can cause unwanted side effects. Also, bash uses completion scripts from other packages, so a complete fix for this problem will require touching other packages too. IMHO we should avoid fixing this bug in RHEL.

Comment 21 Siteshwar Vashisht 2018-10-31 14:34:57 UTC
Closing as wontfix. See comment 20 for justification.


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