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
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.