-
-
Save Redoubts/817e3f6305b0d9d0b1d4 to your computer and use it in GitHub Desktop.
yum up<tab> with set -x
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@virtualnegro ~]# sudo yum up+ local cur prev words cword | |
+ _init_completion | |
+ local exclude= flag outx errx inx OPTIND=1 | |
+ getopts n:e:o:i:s flag | |
+ COMPREPLY=() | |
+ local 'redir=@(?([0-9])<|?([0-9&])>?(>)|>&)' | |
+ _get_comp_words_by_ref -n '<>&' cur prev words cword | |
+ local exclude flag i OPTIND=1 | |
+ words=() | |
+ local cur cword words | |
+ upargs=() | |
+ upvars=() | |
+ local upargs upvars vcur vcword vprev vwords | |
+ getopts c:i:n:p:w: flag -n '<>&' cur prev words cword | |
+ case $flag in | |
+ exclude='<>&' | |
+ getopts c:i:n:p:w: flag -n '<>&' cur prev words cword | |
+ [[ 6 -ge 3 ]] | |
+ case ${!OPTIND} in | |
+ vcur=cur | |
+ let 'OPTIND += 1' | |
+ [[ 6 -ge 4 ]] | |
+ case ${!OPTIND} in | |
+ vprev=prev | |
+ let 'OPTIND += 1' | |
+ [[ 6 -ge 5 ]] | |
+ case ${!OPTIND} in | |
+ vwords=words | |
+ let 'OPTIND += 1' | |
+ [[ 6 -ge 6 ]] | |
+ case ${!OPTIND} in | |
+ vcword=cword | |
+ let 'OPTIND += 1' | |
+ [[ 6 -ge 7 ]] | |
+ __get_cword_at_cursor_by_ref '<>&' words cword cur | |
+ words=() | |
+ local cword words | |
+ __reassemble_comp_words_by_ref '<>&' words cword | |
+ local exclude i j line ref | |
+ [[ -n <>& ]] | |
+ exclude='<>&' | |
+ eval cword=2 | |
++ cword=2 | |
+ [[ -n <>& ]] | |
+ line='sudo yum up' | |
+ (( i=0, j=0 )) | |
+ (( i < 3 )) | |
+ [[ 0 -gt 0 ]] | |
+ ref='words[0]' | |
+ eval 'words[0]=${!ref}${COMP_WORDS[i]}' | |
++ words[0]=sudo | |
+ line=' yum up' | |
+ [[ 0 == 2 ]] | |
+ (( i++, j++ )) | |
+ (( i < 3 )) | |
+ [[ 1 -gt 0 ]] | |
+ [[ yum == +([<>&]) ]] | |
+ ref='words[1]' | |
+ eval 'words[1]=${!ref}${COMP_WORDS[i]}' | |
++ words[1]=yum | |
+ line=' up' | |
+ [[ 1 == 2 ]] | |
+ (( i++, j++ )) | |
+ (( i < 3 )) | |
+ [[ 2 -gt 0 ]] | |
+ [[ up == +([<>&]) ]] | |
+ ref='words[2]' | |
+ eval 'words[2]=${!ref}${COMP_WORDS[i]}' | |
++ words[2]=up | |
+ line= | |
+ [[ 2 == 2 ]] | |
+ eval cword=2 | |
++ cword=2 | |
+ (( i++, j++ )) | |
+ (( i < 3 )) | |
+ [[ 3 == 2 ]] | |
+ local i cur index=11 'lead=sudo yum up' | |
+ [[ 11 -gt 0 ]] | |
+ [[ -n sudo yum up ]] | |
+ [[ -n sudoyumup ]] | |
+ cur='sudo yum up' | |
+ (( i = 0 )) | |
+ (( i <= cword )) | |
+ [[ 11 -ge 4 ]] | |
+ [[ sudo != \s\u\d\o ]] | |
+ [[ 0 -lt 2 ]] | |
+ local old_size=11 | |
+ cur=' yum up' | |
+ local new_size=7 | |
+ index=7 | |
+ (( ++i )) | |
+ (( i <= cword )) | |
+ [[ 7 -ge 3 ]] | |
+ [[ yu != \y\u\m ]] | |
+ cur='yum up' | |
+ (( index-- )) | |
+ [[ 6 -ge 3 ]] | |
+ [[ yum != \y\u\m ]] | |
+ [[ 1 -lt 2 ]] | |
+ local old_size=6 | |
+ cur=' up' | |
+ local new_size=3 | |
+ index=3 | |
+ (( ++i )) | |
+ (( i <= cword )) | |
+ [[ 3 -ge 2 ]] | |
+ [[ u != \u\p ]] | |
+ cur=up | |
+ (( index-- )) | |
+ [[ 2 -ge 2 ]] | |
+ [[ up != \u\p ]] | |
+ [[ 2 -lt 2 ]] | |
+ (( ++i )) | |
+ (( i <= cword )) | |
+ [[ -n up ]] | |
+ [[ ! -n up ]] | |
+ [[ 2 -lt 0 ]] | |
+ local words cword cur | |
+ _upvars -a3 words sudo yum up -v cword 2 -v cur up | |
+ (( 11 )) | |
+ (( 11 )) | |
+ case $1 in | |
+ [[ -n 3 ]] | |
+ printf %d 3 | |
+ [[ -n words ]] | |
+ unset -v words | |
+ eval 'words=("${@:3:3}")' | |
++ words=("${@:3:3}") | |
+ shift 5 | |
+ (( 6 )) | |
+ case $1 in | |
+ [[ -n cword ]] | |
+ unset -v cword | |
+ eval 'cword="$3"' | |
++ cword=2 | |
+ shift 3 | |
+ (( 3 )) | |
+ case $1 in | |
+ [[ -n cur ]] | |
+ unset -v cur | |
+ eval 'cur="$3"' | |
++ cur=up | |
+ shift 3 | |
+ (( 0 )) | |
+ [[ -n cur ]] | |
+ upvars+=("$vcur") | |
+ upargs+=(-v $vcur "$cur") | |
+ [[ -n cword ]] | |
+ upvars+=("$vcword") | |
+ upargs+=(-v $vcword "$cword") | |
+ [[ -n prev ]] | |
+ [[ 2 -ge 1 ]] | |
+ upvars+=("$vprev") | |
+ upargs+=(-v $vprev "${words[cword - 1]}") | |
+ [[ -n words ]] | |
+ upvars+=("$vwords") | |
+ upargs+=(-a${#words[@]} $vwords "${words[@]}") | |
+ (( 4 )) | |
+ local cur cword prev words | |
+ _upvars -v cur up -v cword 2 -v prev yum -a3 words sudo yum up | |
+ (( 14 )) | |
+ (( 14 )) | |
+ case $1 in | |
+ [[ -n cur ]] | |
+ unset -v cur | |
+ eval 'cur="$3"' | |
++ cur=up | |
+ shift 3 | |
+ (( 11 )) | |
+ case $1 in | |
+ [[ -n cword ]] | |
+ unset -v cword | |
+ eval 'cword="$3"' | |
++ cword=2 | |
+ shift 3 | |
+ (( 8 )) | |
+ case $1 in | |
+ [[ -n prev ]] | |
+ unset -v prev | |
+ eval 'prev="$3"' | |
++ prev=yum | |
+ shift 3 | |
+ (( 5 )) | |
+ case $1 in | |
+ [[ -n 3 ]] | |
+ printf %d 3 | |
+ [[ -n words ]] | |
+ unset -v words | |
+ eval 'words=("${@:3:3}")' | |
++ words=("${@:3:3}") | |
+ shift 5 | |
+ (( 0 )) | |
+ _variables | |
+ [[ up =~ ^(\$\{?)([A-Za-z0-9_]*)$ ]] | |
+ return 1 | |
+ [[ up == @(?([0-9])<|?([0-9&])>?(>)|>&)* ]] | |
+ [[ yum == @(?([0-9])<|?([0-9&])>?(>)|>&) ]] | |
+ local i skip | |
+ (( i=1 )) | |
+ (( i < 3 )) | |
+ [[ yum == @(?([0-9])<|?([0-9&])>?(>)|>&)* ]] | |
+ i=2 | |
+ (( 1 )) | |
+ (( i < 3 )) | |
+ [[ up == @(?([0-9])<|?([0-9&])>?(>)|>&)* ]] | |
+ i=3 | |
+ (( 1 )) | |
+ (( i < 3 )) | |
+ [[ 2 -eq 0 ]] | |
+ prev=yum | |
+ [[ -n '' ]] | |
+ return 0 | |
+ local i mode=normal | |
+ [[ sudo == *sudoedit ]] | |
+ [[ normal == normal ]] | |
+ (( i=1 )) | |
+ (( i <= COMP_CWORD )) | |
+ [[ yum != -* ]] | |
+ local PATH=/usr/lib64/ccache:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/home/redoubts/.local/bin:/home/redoubts/bin:/sbin:/usr/sbin:/usr/local/sbin | |
+ local root_command=yum | |
+ _command_offset 1 | |
+ local word_offset=1 i j | |
+ (( i=0 )) | |
+ (( i < 1 )) | |
+ (( j=0 )) | |
+ (( j <= 11 )) | |
+ [[ sudo yum up == \s\u\d\o* ]] | |
+ break | |
+ COMP_LINE=' yum up' | |
+ (( COMP_POINT-=4 )) | |
+ (( i++ )) | |
+ (( i < 1 )) | |
+ (( i=0 )) | |
+ (( i <= COMP_CWORD - 1 )) | |
+ COMP_WORDS[i]=yum | |
+ (( i++ )) | |
+ (( i <= COMP_CWORD - 1 )) | |
+ COMP_WORDS[i]=up | |
+ (( i++ )) | |
+ (( i <= COMP_CWORD - 1 )) | |
+ (( i )) | |
+ (( i <= COMP_CWORD )) | |
+ unset 'COMP_WORDS[i]' | |
+ (( i++ )) | |
+ (( i <= COMP_CWORD )) | |
+ (( COMP_CWORD -= 1 )) | |
+ COMPREPLY=() | |
+ local cur | |
+ _get_comp_words_by_ref cur | |
+ local exclude flag i OPTIND=1 | |
+ words=() | |
+ local cur cword words | |
+ upargs=() | |
+ upvars=() | |
+ local upargs upvars vcur vcword vprev vwords | |
+ getopts c:i:n:p:w: flag cur | |
+ [[ 1 -ge 1 ]] | |
+ case ${!OPTIND} in | |
+ vcur=cur | |
+ let 'OPTIND += 1' | |
+ [[ 1 -ge 2 ]] | |
+ __get_cword_at_cursor_by_ref '' words cword cur | |
+ words=() | |
+ local cword words | |
+ __reassemble_comp_words_by_ref '' words cword | |
+ local exclude i j line ref | |
+ [[ -n '' ]] | |
+ eval cword=1 | |
++ cword=1 | |
+ [[ -n '' ]] | |
+ eval 'words=(' '"${COMP_WORDS[@]}"' ')' | |
++ words=("${COMP_WORDS[@]}") | |
+ local i cur index=7 'lead= yum up' | |
+ [[ 7 -gt 0 ]] | |
+ [[ -n yum up ]] | |
+ [[ -n yumup ]] | |
+ cur=' yum up' | |
+ (( i = 0 )) | |
+ (( i <= cword )) | |
+ [[ 7 -ge 3 ]] | |
+ [[ yu != \y\u\m ]] | |
+ cur='yum up' | |
+ (( index-- )) | |
+ [[ 6 -ge 3 ]] | |
+ [[ yum != \y\u\m ]] | |
+ [[ 0 -lt 1 ]] | |
+ local old_size=6 | |
+ cur=' up' | |
+ local new_size=3 | |
+ index=3 | |
+ (( ++i )) | |
+ (( i <= cword )) | |
+ [[ 3 -ge 2 ]] | |
+ [[ u != \u\p ]] | |
+ cur=up | |
+ (( index-- )) | |
+ [[ 2 -ge 2 ]] | |
+ [[ up != \u\p ]] | |
+ [[ 1 -lt 1 ]] | |
+ (( ++i )) | |
+ (( i <= cword )) | |
+ [[ -n up ]] | |
+ [[ ! -n up ]] | |
+ [[ 2 -lt 0 ]] | |
+ local words cword cur | |
+ _upvars -a2 words yum up -v cword 1 -v cur up | |
+ (( 10 )) | |
+ (( 10 )) | |
+ case $1 in | |
+ [[ -n 2 ]] | |
+ printf %d 2 | |
+ [[ -n words ]] | |
+ unset -v words | |
+ eval 'words=("${@:3:2}")' | |
++ words=("${@:3:2}") | |
+ shift 4 | |
+ (( 6 )) | |
+ case $1 in | |
+ [[ -n cword ]] | |
+ unset -v cword | |
+ eval 'cword="$3"' | |
++ cword=1 | |
+ shift 3 | |
+ (( 3 )) | |
+ case $1 in | |
+ [[ -n cur ]] | |
+ unset -v cur | |
+ eval 'cur="$3"' | |
++ cur=up | |
+ shift 3 | |
+ (( 0 )) | |
+ [[ -n cur ]] | |
+ upvars+=("$vcur") | |
+ upargs+=(-v $vcur "$cur") | |
+ [[ -n '' ]] | |
+ [[ -n '' ]] | |
+ [[ -n '' ]] | |
+ (( 1 )) | |
+ local cur | |
+ _upvars -v cur up | |
+ (( 3 )) | |
+ (( 3 )) | |
+ case $1 in | |
+ [[ -n cur ]] | |
+ unset -v cur | |
+ eval 'cur="$3"' | |
++ cur=up | |
+ shift 3 | |
+ (( 0 )) | |
+ [[ 1 -eq 0 ]] | |
+ local cmd=yum compcmd=yum | |
++ complete -p yum | |
+ local 'cspec=complete -o filenames -F _yum yum' | |
+ [[ ! -n complete -o filenames -F _yum yum ]] | |
+ [[ ! -n complete -o filenames -F _yum yum ]] | |
+ [[ -n complete -o filenames -F _yum yum ]] | |
+ [[ _yum yum != complete -o filenames -F _yum yum ]] | |
+ local 'func=_yum yum' | |
+ func=_yum | |
+ [[ 2 -ge 2 ]] | |
+ _yum yum up yum | |
+ COMPREPLY=() | |
+ words=("${COMP_WORDS[@]}") | |
+ local yum=yum cur=up prev=yum words | |
+ declare -F _get_comp_words_by_ref | |
+ _get_comp_words_by_ref -n = cur prev words | |
+ local exclude flag i OPTIND=1 | |
+ words=() | |
+ local cur cword words | |
+ upargs=() | |
+ upvars=() | |
+ local upargs upvars vcur vcword vprev vwords | |
+ getopts c:i:n:p:w: flag -n = cur prev words | |
+ case $flag in | |
+ exclude== | |
+ getopts c:i:n:p:w: flag -n = cur prev words | |
+ [[ 5 -ge 3 ]] | |
+ case ${!OPTIND} in | |
+ vcur=cur | |
+ let 'OPTIND += 1' | |
+ [[ 5 -ge 4 ]] | |
+ case ${!OPTIND} in | |
+ vprev=prev | |
+ let 'OPTIND += 1' | |
+ [[ 5 -ge 5 ]] | |
+ case ${!OPTIND} in | |
+ vwords=words | |
+ let 'OPTIND += 1' | |
+ [[ 5 -ge 6 ]] | |
+ __get_cword_at_cursor_by_ref = words cword cur | |
+ words=() | |
+ local cword words | |
+ __reassemble_comp_words_by_ref = words cword | |
+ local exclude i j line ref | |
+ [[ -n = ]] | |
+ exclude== | |
+ eval cword=1 | |
++ cword=1 | |
+ [[ -n = ]] | |
+ line=' yum up' | |
+ (( i=0, j=0 )) | |
+ (( i < 2 )) | |
+ [[ 0 -gt 0 ]] | |
+ ref='words[0]' | |
+ eval 'words[0]=${!ref}${COMP_WORDS[i]}' | |
++ words[0]=yum | |
+ line=' up' | |
+ [[ 0 == 1 ]] | |
+ (( i++, j++ )) | |
+ (( i < 2 )) | |
+ [[ 1 -gt 0 ]] | |
+ [[ up == +([=]) ]] | |
+ ref='words[1]' | |
+ eval 'words[1]=${!ref}${COMP_WORDS[i]}' | |
++ words[1]=up | |
+ line= | |
+ [[ 1 == 1 ]] | |
+ eval cword=1 | |
++ cword=1 | |
+ (( i++, j++ )) | |
+ (( i < 2 )) | |
+ [[ 2 == 1 ]] | |
+ local i cur index=7 'lead= yum up' | |
+ [[ 7 -gt 0 ]] | |
+ [[ -n yum up ]] | |
+ [[ -n yumup ]] | |
+ cur=' yum up' | |
+ (( i = 0 )) | |
+ (( i <= cword )) | |
+ [[ 7 -ge 3 ]] | |
+ [[ yu != \y\u\m ]] | |
+ cur='yum up' | |
+ (( index-- )) | |
+ [[ 6 -ge 3 ]] | |
+ [[ yum != \y\u\m ]] | |
+ [[ 0 -lt 1 ]] | |
+ local old_size=6 | |
+ cur=' up' | |
+ local new_size=3 | |
+ index=3 | |
+ (( ++i )) | |
+ (( i <= cword )) | |
+ [[ 3 -ge 2 ]] | |
+ [[ u != \u\p ]] | |
+ cur=up | |
+ (( index-- )) | |
+ [[ 2 -ge 2 ]] | |
+ [[ up != \u\p ]] | |
+ [[ 1 -lt 1 ]] | |
+ (( ++i )) | |
+ (( i <= cword )) | |
+ [[ -n up ]] | |
+ [[ ! -n up ]] | |
+ [[ 2 -lt 0 ]] | |
+ local words cword cur | |
+ _upvars -a2 words yum up -v cword 1 -v cur up | |
+ (( 10 )) | |
+ (( 10 )) | |
+ case $1 in | |
+ [[ -n 2 ]] | |
+ printf %d 2 | |
+ [[ -n words ]] | |
+ unset -v words | |
+ eval 'words=("${@:3:2}")' | |
++ words=("${@:3:2}") | |
+ shift 4 | |
+ (( 6 )) | |
+ case $1 in | |
+ [[ -n cword ]] | |
+ unset -v cword | |
+ eval 'cword="$3"' | |
++ cword=1 | |
+ shift 3 | |
+ (( 3 )) | |
+ case $1 in | |
+ [[ -n cur ]] | |
+ unset -v cur | |
+ eval 'cur="$3"' | |
++ cur=up | |
+ shift 3 | |
+ (( 0 )) | |
+ [[ -n cur ]] | |
+ upvars+=("$vcur") | |
+ upargs+=(-v $vcur "$cur") | |
+ [[ -n '' ]] | |
+ [[ -n prev ]] | |
+ [[ 1 -ge 1 ]] | |
+ upvars+=("$vprev") | |
+ upargs+=(-v $vprev "${words[cword - 1]}") | |
+ [[ -n words ]] | |
+ upvars+=("$vwords") | |
+ upargs+=(-a${#words[@]} $vwords "${words[@]}") | |
+ (( 3 )) | |
+ local cur prev words | |
+ _upvars -v cur up -v prev yum -a2 words yum up | |
+ (( 10 )) | |
+ (( 10 )) | |
+ case $1 in | |
+ [[ -n cur ]] | |
+ unset -v cur | |
+ eval 'cur="$3"' | |
++ cur=up | |
+ shift 3 | |
+ (( 7 )) | |
+ case $1 in | |
+ [[ -n prev ]] | |
+ unset -v prev | |
+ eval 'prev="$3"' | |
++ prev=yum | |
+ shift 3 | |
+ (( 4 )) | |
+ case $1 in | |
+ [[ -n 2 ]] | |
+ printf %d 2 | |
+ [[ -n words ]] | |
+ unset -v words | |
+ eval 'words=("${@:3:2}")' | |
++ words=("${@:3:2}") | |
+ shift 4 | |
+ (( 0 )) | |
+ cmds=(check check-update clean deplist distro-sync downgrade groups help history info install list load-transaction makecache provides reinstall remove repolist search shell update upgrade version) | |
+ local cmds | |
+ local i c cmd subcmd | |
+ (( i=1 )) | |
+ (( i < 2-1 )) | |
+ case $cmd in | |
+ local split=false | |
+ declare -F _split_longopt | |
+ _split_longopt | |
+ [[ up == --?*=* ]] | |
+ return 1 | |
+ _yum_complete_baseopts up yum | |
+ case $2 in | |
+ return 1 | |
+ false | |
+ [[ up == -* ]] | |
+ COMPREPLY=($( compgen -W '${cmds[@]}' -- "$cur" )) | |
++ compgen -W '${cmds[@]}' -- up | |
+ local opt | |
+ [[ complete -o filenames -F _yum yum == *\ \-\o\ * ]] | |
+ cspec='filenames -F _yum yum' | |
+ opt=filenames | |
+ compopt -o filenames | |
+ cspec=' -F _yum yum' | |
+ [[ -F _yum yum == *\ \-\o\ * ]] | |
+ return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment