Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
DescriptionOrhan 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=100114http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=632026
The same problem occurs on Fedora 20 as well.
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?
*** Bug 1309920 has been marked as a duplicate of this bug. ***
Comment 13David 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 14Siteshwar Vashisht
2016-05-24 09:13:20 UTC
Comment 20Siteshwar 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 21Siteshwar Vashisht
2018-10-31 14:34:57 UTC
Closing as wontfix. See comment 20 for justification.