Bug 994646
Summary: | attempting tab-completion with "TZ=" returns files and directories, not time zones | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Steve Tyler <stephent98> |
Component: | bash-completion | Assignee: | Ville Skyttä <ville.skytta> |
Status: | CLOSED CANTFIX | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 19 | CC: | sheltren, stephent98, ville.skytta |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-08-08 09:54:29 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Steve Tyler
2013-08-07 17:11:19 UTC
Completing the first argument is not something that can be done with bash's programmable completion features as far as I know. On the other hand, for export and friends (at least env, declare, typeset) it can be done, and is now done for export upstream: http://anonscm.debian.org/gitweb/?p=bash-completion/bash-completion.git;a=commitdiff;h=3f144beb721525821136f76f53a3147b4688d331 Your upstream patch looks like it _fixes_ this bug. Why did you close it CANTFIX instead of UPSTREAM? Because as said, the requested feature cannot AFAIK be implemented. The upstream patch implements "export TZ=<TAB>" completion, not plain "TZ=<TAB>" which is what was requested. Thanks for the clarification. The upstream version doesn't appear to work with: $ export TZ=[tab] That returns a list of files and directories, not a list of time zones. To test the upstream version, do I need to do anything in addition to these? 1. Copy upstream version of bash_completion into /usr/share/bash-completion/: $ ls /usr/share/bash-completion/ bash_completion bash_completion.ORIG completions/ helpers/ $ rpm -V bash-completion SM5..UGT. /usr/share/bash-completion/bash_completion 2. Log out. 3. Log in. You need updated completions/export in /usr/share/bash-completion/completions from upstream too. Verified. Thanks for the patch. $ export TZ=U[tab] UCT Universal US/ UTC $ export TZ=UTC ;date Thu Aug 8 11:51:50 UTC 2013 $ rpm -V bash-completion SM5..UGT. /usr/share/bash-completion/bash_completion SM5..UGT. /usr/share/bash-completion/completions/export BTW, I didn't know tab-completion requires so much infrastructure: $ rpm -ql bash-completion | wc -l 563 (In reply to Steve Tyler from comment #6) > $ rpm -ql bash-completion | wc -l > 563 We could (and used to) lump everything into just a couple of files, but since version 2.0 splitting most things into per command completion files allows us to dynamically load needed functions from them on demand which allows huge shell startup time savings. That sounds like a valuable optimization: $ rpm -ql bash-completion | grep /usr/share/bash-completion/ | xargs cat 2>/dev/null | wc -l 81051 |