Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 612149 Details for
Bug 856691
Beaker completion in bash-completion
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
bkr.bash
bkr.bash (text/plain), 1.57 KB, created by
Filip Holec
on 2012-09-12 15:15:08 UTC
(
hide
)
Description:
bkr.bash
Filename:
MIME Type:
Creator:
Filip Holec
Created:
2012-09-12 15:15:08 UTC
Size:
1.57 KB
patch
obsolete
># Bkr file for Bash Completion ># Maintainer: Filip Holec [fholec@redhat.com] ># Last Revision: 22 Aug 2012 > ># Function expands options from main option (like workflow-tcms) >_bkr_complete() >{ > local component=$( echo $COMP_LINE | cut -d' ' -f2 ) > if [ $component != "" ] ; then > local opts=$(echo $( bkr $component --help | grep -o -- '--[^ =]*' | sort | uniq ) --help ) > > [[ $COMP_LINE == bkr\ $component* ]] && \ > printf %s "$opts" > fi >} > ># Main for bkr >_bkr() >{ > COMPREPLY=() > local bkr=$1 > local cur prev > local -a words > if type _get_comp_words_by_ref &>/dev/null; then > _get_comp_words_by_ref cur prev words > else > cur=$2 prev=$3 words=("${COMP_WORDS[@]}") > fi > > # Commands offered as completions for bkr > local cmds=( $( bkr --help | grep " " | cut -d' ' -f3 | sed '1d' | cut -d'=' -f1 ) -h --help ) > > local i c cmd > for (( i=1; i < ${#words[@]}-1; i++ )) ; do > [[ -n $cmd ]] && break > # Recognize additional commands and aliases > for c in ${cmds[@]} ; do > [[ ${words[i]} == $c ]] && cmd=$c && break > done > done > > # Check if element is command > exists=0 > for i in ${cmds[@]} ; do > if [[ $cmd == $i ]] ; then > exists=1 > fi > done > > # Check for main option choices > if [[ $cmd =~ [a-z]* && $exists == 1 ]] ; then > COMPREPLY=( $( compgen -W '$( _bkr_complete )' -- "$cur" ) ) > return 0 > fi > > # Check for main options > COMPREPLY=( $( compgen -W ' ${cmds[@]}' -- "$cur" ) ) >} && >complete -F _bkr -o filenames bkr bkrmain.py
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 856691
: 612149