Bug 856691
| Summary: | Beaker completion in bash-completion | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Retired] Beaker | Reporter: | Filip Holec <fholec> | ||||
| Component: | command line | Assignee: | Dan Callaghan <dcallagh> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | |||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 0.9 | CC: | asaha, bpeck, dcallagh, kbaker, lzachar, mishin, psplicha, rmancy | ||||
| Target Milestone: | --- | Keywords: | FutureFeature | ||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Enhancement | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2012-10-11 23:49:45 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: | |||||||
| Attachments: |
|
||||||
Thanks! I haven't tested it yet but it looks good. I have been thinking for ages that we need a bash completion script. On Gerrit for review: http://gerrit.beaker-project.org/1359 Verified. But see: https://bugzilla.redhat.com/show_bug.cgi?id=862143 *** Bug 862143 has been marked as a duplicate of this bug. *** We will need to fix the stderr spew as described by Amit in bug 862143. Fix is on Gerrit: http://gerrit.beaker-project.org/1395 The bash completion of 'bkr' lists '--password' as an option, bash completion of 'bkr --password' lists the following [rmancy@rmancy ~]$ bkr --password -- --help --help] --password --username Notice the '--help]'. Also, none of these completions actually render a sensible command. This should fix it:
<local opts=$(echo $( bkr $component --help 2>/dev/null | grep -o -- '--[^ =]*' | sort | uniq ) --help )
>local opts=$(echo $( bkr $component --help 2>/dev/null | grep -v "Usage:" | grep -o -- '--[^ =]*' | sort | uniq ) --help )
Beaker 0.9.4 has been released. |
Created attachment 612149 [details] bkr.bash Description of problem: This project is an enhancement (Future Feature) for beaker. Its main purpose is to provide more comfort when typing beaker commands. Install: 1. Install bash-completion 2. Download file bkr.bash 3. Move it to /etc/bash_completion.d/ as root 4. Restart terminal Example of usage: bkr wor<TAB><TAB> bkr workflow- bkr workflow-t<TAB><TAB> bkr workflow-tcms bkr workflow-tcms --com<TAB><TAB> bkr workflow-tcms --component