Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 1723065 Details for
Bug 1876397
[ALL LANG][RHSM CLI] Redundant number '8' after Usage for each CLI.
Home
New
Search
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.rh92 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
output of set
set.txt (text/plain), 114.99 KB, created by
Lijun Li
on 2020-10-21 02:34:16 UTC
(
hide
)
Description:
output of set
Filename:
MIME Type:
Creator:
Lijun Li
Created:
2020-10-21 02:34:16 UTC
Size:
114.99 KB
patch
obsolete
>[root@localhost ~]# set >BASH=/bin/bash >BASHOPTS=checkwinsize:cmdhist:complete_fullquote:expand_aliases:extglob:extquote:force_fignore:histappend:interactive_comments:login_shell:progcomp:promptvars:sourcepath >BASHRCSOURCED=Y >BASH_ALIASES=() >BASH_ARGC=() >BASH_ARGV=() >BASH_CMDS=() >BASH_COMPLETION_VERSINFO=([0]="2" [1]="7") >BASH_LINENO=() >BASH_REMATCH=() >BASH_SOURCE=() >BASH_VERSINFO=([0]="4" [1]="4" [2]="19" [3]="1" [4]="release" [5]="x86_64-redhat-linux-gnu") >BASH_VERSION='4.4.19(1)-release' >COLUMNS=80 >COMP_WORDBREAKS=$' \t\n"\'><=;|&(:' >CONF_FILE=/etc/vdoconf.yml >DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/0/bus >DIRSTACK=() >EUID=0 >GLUSTER_BARRIER_OPTIONS=$'\n {enable},\n {disable}\n' >GLUSTER_COMMAND_TREE=$'\n{gluster [\n \n {volume [\n {add-brick\n {__VOLNAME}\n },\n {barrier\n {__VOLNAME\n [ \n {enable},\n {disable}\n ]\n }\n },\n {clear-locks\n {__VOLNAME}\n },\n {create},\n {delete\n {__VOLNAME}\n },\n {geo-replication\n [ \n {__VOLNAME [\n {__SLAVEURL [\n {create [\n {push-pem\n {force}\n },\n {force}\n ]\n },\n {start {force} },\n {status {detail} },\n {config},\n {pause {force} },\n {resume {force} },\n {stop {force} },\n {delete {force} }\n ]\n },\n {status}\n ]\n },\n {status}\n ]\n },\n {heal\n {__VOLNAME}\n },\n {help},\n {info\n {__VOLNAME}\n },\n {list},\n {log\n {__VOLNAME}\n },\n {profile\n {__VOLNAME\n [ \n {start},\n {info [\n {peek},\n {incremental\n {peek}\n },\n {cumulative},\n {clear},\n ]\n },\n {stop}\n ]\n }\n },\n {quota\n {__VOLNAME\n [ \n {enable},\n {disable},\n {list},\n {remove},\n {default-soft-limit},\n {limit-usage},\n {alert-time},\n {soft-timeout},\n {hard-timeout}\n ]\n }\n },\n {rebalance\n {__VOLNAME}\n },\n {remove-brick\n {__VOLNAME}\n },\n {replace-brick\n {__VOLNAME}\n },\n {reset\n {__VOLNAME\n [ ]\n }\n },\n {set\n {__VOLNAME\n [ ]\n }\n },\n {start\n {__VOLNAME\n {force}\n }\n },\n {statedump\n {__VOLNAME}\n },\n {status\n {__VOLNAME}\n },\n {stop\n {__VOLNAME\n {force}\n }\n },\n {sync\n {__HOSTNAME}\n },\n {top\n {__VOLNAME\n [ \n {open\n [ \n {nfs},\n {brick},\n {list-cnt}\n ]\n },\n {read\n [ \n {nfs},\n {brick},\n {list-cnt}\n ]\n },\n {write\n [ \n {nfs},\n {brick},\n {list-cnt}\n ]\n },\n {opendir\n [ \n {nfs},\n {brick},\n {list-cnt}\n ]\n },\n {readdir\n [ \n {nfs},\n {brick},\n {list-cnt}\n ]\n },\n {clear\n [ \n {nfs},\n {brick},\n {list-cnt}\n ]\n },\n {read-perf\n [ \n {bs\n {__SIZE\n {count}\n }\n },\n {brick},\n {list-cnt}\n ]\n },\n {write-perf\n [ \n {bs\n {__SIZE\n {count}\n }\n },\n {brick},\n {list-cnt}\n ]\n }\n ]\n }\n }\n ]\n }\n ,\n {peer [\n {probe\n {__HOSTNAME}\n },\n {detach\n {__HOSTNAME\n {force}\n }\n },\n {status}\n ]\n },\n {pool\n {list}\n },\n {help}\n ]\n}' >GLUSTER_FINAL_LIST= >GLUSTER_GEO_REPLICATION_OPTIONS=$'\n {__VOLNAME [\n {__SLAVEURL [\n {create [\n {push-pem\n {force}\n },\n {force}\n ]\n },\n {start {force} },\n {status {detail} },\n {config},\n {pause {force} },\n {resume {force} },\n {stop {force} },\n {delete {force} }\n ]\n },\n {status}\n ]\n },\n {status}\n' >GLUSTER_GEO_REPLICATION_SUBOPTIONS=$'\n' >GLUSTER_LIST= >GLUSTER_PROFILE_OPTIONS=$'\n {start},\n {info [\n {peek},\n {incremental\n {peek}\n },\n {cumulative},\n {clear},\n ]\n },\n {stop}\n' >GLUSTER_QUOTA_OPTIONS=$'\n {enable},\n {disable},\n {list},\n {remove},\n {default-soft-limit},\n {limit-usage},\n {alert-time},\n {soft-timeout},\n {hard-timeout}\n' >GLUSTER_TOP=0 >GLUSTER_TOP_OPTIONS=$'\n {open\n [ \n {nfs},\n {brick},\n {list-cnt}\n ]\n },\n {read\n [ \n {nfs},\n {brick},\n {list-cnt}\n ]\n },\n {write\n [ \n {nfs},\n {brick},\n {list-cnt}\n ]\n },\n {opendir\n [ \n {nfs},\n {brick},\n {list-cnt}\n ]\n },\n {readdir\n [ \n {nfs},\n {brick},\n {list-cnt}\n ]\n },\n {clear\n [ \n {nfs},\n {brick},\n {list-cnt}\n ]\n },\n {read-perf\n [ \n {bs\n {__SIZE\n {count}\n }\n },\n {brick},\n {list-cnt}\n ]\n },\n {write-perf\n [ \n {bs\n {__SIZE\n {count}\n }\n },\n {brick},\n {list-cnt}\n ]\n }\n' >GLUSTER_TOP_SUBOPTIONS1=$'\n {nfs},\n {brick},\n {list-cnt}\n' >GLUSTER_TOP_SUBOPTIONS2=$'\n {bs\n {__SIZE\n {count}\n }\n },\n {brick},\n {list-cnt}\n' >GLUSTER_VOLUME_OPTIONS=$'\n {volume [\n {add-brick\n {__VOLNAME}\n },\n {barrier\n {__VOLNAME\n [ \n {enable},\n {disable}\n ]\n }\n },\n {clear-locks\n {__VOLNAME}\n },\n {create},\n {delete\n {__VOLNAME}\n },\n {geo-replication\n [ \n {__VOLNAME [\n {__SLAVEURL [\n {create [\n {push-pem\n {force}\n },\n {force}\n ]\n },\n {start {force} },\n {status {detail} },\n {config},\n {pause {force} },\n {resume {force} },\n {stop {force} },\n {delete {force} }\n ]\n },\n {status}\n ]\n },\n {status}\n ]\n },\n {heal\n {__VOLNAME}\n },\n {help},\n {info\n {__VOLNAME}\n },\n {list},\n {log\n {__VOLNAME}\n },\n {profile\n {__VOLNAME\n [ \n {start},\n {info [\n {peek},\n {incremental\n {peek}\n },\n {cumulative},\n {clear},\n ]\n },\n {stop}\n ]\n }\n },\n {quota\n {__VOLNAME\n [ \n {enable},\n {disable},\n {list},\n {remove},\n {default-soft-limit},\n {limit-usage},\n {alert-time},\n {soft-timeout},\n {hard-timeout}\n ]\n }\n },\n {rebalance\n {__VOLNAME}\n },\n {remove-brick\n {__VOLNAME}\n },\n {replace-brick\n {__VOLNAME}\n },\n {reset\n {__VOLNAME\n [ ]\n }\n },\n {set\n {__VOLNAME\n [ ]\n }\n },\n {start\n {__VOLNAME\n {force}\n }\n },\n {statedump\n {__VOLNAME}\n },\n {status\n {__VOLNAME}\n },\n {stop\n {__VOLNAME\n {force}\n }\n },\n {sync\n {__HOSTNAME}\n },\n {top\n {__VOLNAME\n [ \n {open\n [ \n {nfs},\n {brick},\n {list-cnt}\n ]\n },\n {read\n [ \n {nfs},\n {brick},\n {list-cnt}\n ]\n },\n {write\n [ \n {nfs},\n {brick},\n {list-cnt}\n ]\n },\n {opendir\n [ \n {nfs},\n {brick},\n {list-cnt}\n ]\n },\n {readdir\n [ \n {nfs},\n {brick},\n {list-cnt}\n ]\n },\n {clear\n [ \n {nfs},\n {brick},\n {list-cnt}\n ]\n },\n {read-perf\n [ \n {bs\n {__SIZE\n {count}\n }\n },\n {brick},\n {list-cnt}\n ]\n },\n {write-perf\n [ \n {bs\n {__SIZE\n {count}\n }\n },\n {brick},\n {list-cnt}\n ]\n }\n ]\n }\n }\n ]\n }\n' >GROUPS=() >HISTCONTROL=ignoredups >HISTFILE=/root/.bash_history >HISTFILESIZE=1000 >HISTSIZE=1000 >HOME=/root >HOSTNAME=localhost.localdomain >HOSTTYPE=x86_64 >IFS=$' \t\n' >LANG=en_US.UTF-8 >LESSOPEN='||/usr/bin/lesspipe.sh %s' >LINES=24 >LOGNAME=root >LS_COLORS='rs=0:di=38;5;33:ln=38;5;51:mh=00:pi=40;38;5;11:so=38;5;13:do=38;5;5:bd=48;5;232;38;5;11:cd=48;5;232;38;5;3:or=48;5;232;38;5;9:mi=01;05;37;41:su=48;5;196;38;5;15:sg=48;5;11;38;5;16:ca=48;5;196;38;5;226:tw=48;5;10;38;5;16:ow=48;5;10;38;5;21:st=48;5;21;38;5;15:ex=38;5;40:*.tar=38;5;9:*.tgz=38;5;9:*.arc=38;5;9:*.arj=38;5;9:*.taz=38;5;9:*.lha=38;5;9:*.lz4=38;5;9:*.lzh=38;5;9:*.lzma=38;5;9:*.tlz=38;5;9:*.txz=38;5;9:*.tzo=38;5;9:*.t7z=38;5;9:*.zip=38;5;9:*.z=38;5;9:*.dz=38;5;9:*.gz=38;5;9:*.lrz=38;5;9:*.lz=38;5;9:*.lzo=38;5;9:*.xz=38;5;9:*.zst=38;5;9:*.tzst=38;5;9:*.bz2=38;5;9:*.bz=38;5;9:*.tbz=38;5;9:*.tbz2=38;5;9:*.tz=38;5;9:*.deb=38;5;9:*.rpm=38;5;9:*.jar=38;5;9:*.war=38;5;9:*.ear=38;5;9:*.sar=38;5;9:*.rar=38;5;9:*.alz=38;5;9:*.ace=38;5;9:*.zoo=38;5;9:*.cpio=38;5;9:*.7z=38;5;9:*.rz=38;5;9:*.cab=38;5;9:*.wim=38;5;9:*.swm=38;5;9:*.dwm=38;5;9:*.esd=38;5;9:*.jpg=38;5;13:*.jpeg=38;5;13:*.mjpg=38;5;13:*.mjpeg=38;5;13:*.gif=38;5;13:*.bmp=38;5;13:*.pbm=38;5;13:*.pgm=38;5;13:*.ppm=38;5;13:*.tga=38;5;13:*.xbm=38;5;13:*.xpm=38;5;13:*.tif=38;5;13:*.tiff=38;5;13:*.png=38;5;13:*.svg=38;5;13:*.svgz=38;5;13:*.mng=38;5;13:*.pcx=38;5;13:*.mov=38;5;13:*.mpg=38;5;13:*.mpeg=38;5;13:*.m2v=38;5;13:*.mkv=38;5;13:*.webm=38;5;13:*.ogm=38;5;13:*.mp4=38;5;13:*.m4v=38;5;13:*.mp4v=38;5;13:*.vob=38;5;13:*.qt=38;5;13:*.nuv=38;5;13:*.wmv=38;5;13:*.asf=38;5;13:*.rm=38;5;13:*.rmvb=38;5;13:*.flc=38;5;13:*.avi=38;5;13:*.fli=38;5;13:*.flv=38;5;13:*.gl=38;5;13:*.dl=38;5;13:*.xcf=38;5;13:*.xwd=38;5;13:*.yuv=38;5;13:*.cgm=38;5;13:*.emf=38;5;13:*.ogv=38;5;13:*.ogx=38;5;13:*.aac=38;5;45:*.au=38;5;45:*.flac=38;5;45:*.m4a=38;5;45:*.mid=38;5;45:*.midi=38;5;45:*.mka=38;5;45:*.mp3=38;5;45:*.mpc=38;5;45:*.ogg=38;5;45:*.ra=38;5;45:*.wav=38;5;45:*.oga=38;5;45:*.opus=38;5;45:*.spx=38;5;45:*.xspf=38;5;45:' >MACHTYPE=x86_64-redhat-linux-gnu >MAIL=/var/spool/mail/root >MAILCHECK=60 >OPTERR=1 >OPTIND=1 >OSTYPE=linux-gnu >PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin >PIPESTATUS=([0]="0") >PPID=2776 >PROMPT_COMMAND='printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"' >PS1='[\u@\h \W]\$ ' >PS2='> ' >PS4='+ ' >PWD=/root >SELINUX_LEVEL_REQUESTED= >SELINUX_ROLE_REQUESTED= >SELINUX_USE_CURRENT_RANGE= >SHELL=/bin/bash >SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor >SHLVL=1 >SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass >SSH_CLIENT='192.168.122.1 46072 22' >SSH_CONNECTION='192.168.122.1 46072 192.168.122.18 22' >SSH_TTY=/dev/pts/1 >TERM=xterm-256color >UID=0 >USER=root >XDG_DATA_DIRS=/root/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share >XDG_RUNTIME_DIR=/run/user/0 >XDG_SESSION_ID=4 >XMODIFIERS=@im=ibus >_=--color=auto >_backup_glob='@(#*#|*@(~|.@(bak|orig|rej|swp|dpkg*|rpm@(orig|new|save))))' >_xspecs=([freeamp]="!*.@(mp3|ogg|pls|m3u)" [bibtex]="!*.aux" [lualatex]="!*.@(?(la)tex|texi|dtx|ins|ltx|dbj)" [chromium-browser]="!*.@(?([xX]|[sS])[hH][tT][mM]?([lL])|[pP][dD][fF])" [tex]="!*.@(?(la)tex|texi|dtx|ins|ltx|dbj)" [zathura]="!*.@(cb[rz7t]|djv?(u)|?(e)ps|pdf)" [lrunzip]="!*.lrz" [amaya]="!*.@(?([xX]|[sS])[hH][tT][mM]?([lL]))" [hbpp]="!*.@([Pp][Rr][Gg]|[Cc][Ll][Pp])" [lzgrep]="!*.@(tlz|lzma)" [ggv]="!*.@(@(?(e)ps|?(E)PS|pdf|PDF)?(.gz|.GZ|.bz2|.BZ2|.Z))" [lzless]="!*.@(tlz|lzma)" [kdvi]="!*.@(dvi|DVI)?(.@(gz|Z|bz2))" [lbzcat]="!*.?(t)bz?(2)" [lilypond]="!*.ly" [sxemacs]="*.@([ao]|so|so.!(conf|*/*)|[rs]pm|gif|jp?(e)g|mp3|mp?(e)g|avi|asf|ogg|class)" [epdfview]="!*.pdf" [texi2dvi]="!*.@(?(la)tex|texi|dtx|ins|ltx|dbj)" [ps2pdf12]="!*.@(?(e)ps|pdf)" [ee]="!*.@(gif|jp?(e)g|miff|tif?(f)|pn[gm]|p[bgp]m|bmp|xpm|ico|xwd|tga|pcx)" [lbunzip2]="!*.?(t)bz?(2)" [ps2pdf13]="!*.@(?(e)ps|pdf)" [ps2pdf14]="!*.@(?(e)ps|pdf)" [lzfgrep]="!*.@(tlz|lzma)" [hbrun]="!*.[Hh][Rr][Bb]" [kbabel]="!*.po" [rview]="*.@([ao]|so|so.!(conf|*/*)|[rs]pm|gif|jp?(e)g|mp3|mp?(e)g|avi|asf|ogg|class)" [kaffeine]="!*@(.@(mp?(e)g|MP?(E)G|wm[av]|WM[AV]|avi|AVI|asf|vob|VOB|bin|dat|divx|DIVX|vcd|ps|pes|fli|flv|FLV|fxm|FXM|viv|rm|ram|yuv|mov|MOV|qt|QT|web[am]|WEB[AM]|mp[234]|MP[234]|m?(p)4[av]|M?(P)4[AV]|mkv|MKV|og[gmv]|OG[GMV]|t[ps]|T[PS]|m2t?(s)|M2T?(S)|mts|MTS|wav|WAV|flac|FLAC|asx|ASX|mng|MNG|srt|m[eo]d|M[EO]D|s[3t]m|S[3T]M|it|IT|xm|XM|iso|ISO)|+([0-9]).@(vdr|VDR))?(.part)" [xv]="!*.@(gif|jp?(e)g?(2)|j2[ck]|jp[2f]|tif?(f)|png|p[bgp]m|bmp|x[bp]m|rle|rgb|pcx|fits|pm|?(e)ps)" [rgvim]="*.@([ao]|so|so.!(conf|*/*)|[rs]pm|gif|jp?(e)g|mp3|mp?(e)g|avi|asf|ogg|class)" [oodraw]="!*.@(sxd|std|sda|sdd|?(f)odg|otg)" [elinks]="!*.@(?([xX]|[sS])[hH][tT][mM]?([lL]))" [playmidi]="!*.@(mid?(i)|cmf)" [xine]="!*@(.@(mp?(e)g|MP?(E)G|wm[av]|WM[AV]|avi|AVI|asf|vob|VOB|bin|dat|divx|DIVX|vcd|ps|pes|fli|flv|FLV|fxm|FXM|viv|rm|ram|yuv|mov|MOV|qt|QT|web[am]|WEB[AM]|mp[234]|MP[234]|m?(p)4[av]|M?(P)4[AV]|mkv|MKV|og[gmv]|OG[GMV]|t[ps]|T[PS]|m2t?(s)|M2T?(S)|mts|MTS|wav|WAV|flac|FLAC|asx|ASX|mng|MNG|srt|m[eo]d|M[EO]D|s[3t]m|S[3T]M|it|IT|xm|XM)|+([0-9]).@(vdr|VDR))?(.part)" [xpdf]="!*.[pf]df" [aviplay]="!*.@(avi|asf|wmv)" [latex]="!*.@(?(la)tex|texi|dtx|ins|ltx|dbj)" [rvim]="*.@([ao]|so|so.!(conf|*/*)|[rs]pm|gif|jp?(e)g|mp3|mp?(e)g|avi|asf|ogg|class)" [ogg123]="!*.@(ogg|m3u|flac|spx)" [ps2pdfwr]="!*.@(?(e)ps|pdf)" [harbour]="!*.@([Pp][Rr][Gg]|[Cc][Ll][Pp])" [xemacs]="*.@([ao]|so|so.!(conf|*/*)|[rs]pm|gif|jp?(e)g|mp3|mp?(e)g|avi|asf|ogg|class)" [unlzma]="!*.@(tlz|lzma)" [vi]="*.@([ao]|so|so.!(conf|*/*)|[rs]pm|gif|jp?(e)g|mp3|mp?(e)g|avi|asf|ogg|class)" [xetex]="!*.@(?(la)tex|texi|dtx|ins|ltx|dbj)" [gvim]="*.@([ao]|so|so.!(conf|*/*)|[rs]pm|gif|jp?(e)g|mp3|mp?(e)g|avi|asf|ogg|class)" [kid3-qt]="!*.@(mp[234c]|og[ag]|@(fl|a)ac|m4[abp]|spx|tta|w?(a)v|wma|aif?(f)|asf|ape)" [xanim]="!*.@(mpg|mpeg|avi|mov|qt)" [portecle]="!@(*.@(ks|jks|jceks|p12|pfx|bks|ubr|gkr|cer|crt|cert|p7b|pkipath|pem|p10|csr|crl)|cacerts)" [oocalc]="!*.@(sxc|stc|xls?([bmx])|xlw|xlt?([mx])|[ct]sv|?(f)ods|ots)" [emacs]="*.@([ao]|so|so.!(conf|*/*)|[rs]pm|gif|jp?(e)g|mp3|mp?(e)g|avi|asf|ogg|class)" [fbxine]="!*@(.@(mp?(e)g|MP?(E)G|wm[av]|WM[AV]|avi|AVI|asf|vob|VOB|bin|dat|divx|DIVX|vcd|ps|pes|fli|flv|FLV|fxm|FXM|viv|rm|ram|yuv|mov|MOV|qt|QT|web[am]|WEB[AM]|mp[234]|MP[234]|m?(p)4[av]|M?(P)4[AV]|mkv|MKV|og[gmv]|OG[GMV]|t[ps]|T[PS]|m2t?(s)|M2T?(S)|mts|MTS|wav|WAV|flac|FLAC|asx|ASX|mng|MNG|srt|m[eo]d|M[EO]D|s[3t]m|S[3T]M|it|IT|xm|XM)|+([0-9]).@(vdr|VDR))?(.part)" [kpdf]="!*.@(?(e)ps|pdf)" [oomath]="!*.@(sxm|smf|mml|odf)" [compress]="*.Z" [iceweasel]="!*.@(?([xX]|[sS])[hH][tT][mM]?([lL])|[pP][dD][fF])" [zcat]="!*.@(Z|[gGd]z|t[ag]z)" [unzip]="!*.@(zip|[ejsw]ar|exe|pk3|wsz|zargo|xpi|s[tx][cdiw]|sx[gm]|o[dt][tspgfc]|od[bm]|oxt|epub|apk|ipa|do[ct][xm]|p[op]t[mx]|xl[st][xm]|pyz)" [modplug123]="!*.@(669|abc|am[fs]|d[bs]m|dmf|far|it|mdl|m[eo]d|mid?(i)|mt[2m]|oct|okt?(a)|p[st]m|s[3t]m|ult|umx|wav|xm)" [dvipdfm]="!*.dvi" [oobase]="!*.odb" [zipinfo]="!*.@(zip|[ejsw]ar|exe|pk3|wsz|zargo|xpi|s[tx][cdiw]|sx[gm]|o[dt][tspgfc]|od[bm]|oxt|epub|apk|ipa|do[ct][xm]|p[op]t[mx]|xl[st][xm]|pyz)" [epiphany]="!*.@(?([xX]|[sS])[hH][tT][mM]?([lL]))" [galeon]="!*.@(?([xX]|[sS])[hH][tT][mM]?([lL]))" [bzme]="!*.@(zip|z|gz|tgz)" [xfig]="!*.fig" [xdvi]="!*.@(dvi|DVI)?(.@(gz|Z|bz2))" [cdiff]="!*.@(dif?(f)|?(d)patch)?(.@([gx]z|bz2|lzma))" [rgview]="*.@([ao]|so|so.!(conf|*/*)|[rs]pm|gif|jp?(e)g|mp3|mp?(e)g|avi|asf|ogg|class)" [oowriter]="!*.@(sxw|stw|sxg|sgl|doc?([mx])|dot?([mx])|rtf|txt|htm|html|?(f)odt|ott|odm|pdf)" [netscape]="!*.@(?([xX]|[sS])[hH][tT][mM]?([lL]))" [acroread]="!*.[pf]df" [makeinfo]="!*.texi*" [kwrite]="*.@([ao]|so|so.!(conf|*/*)|[rs]pm|gif|jp?(e)g|mp3|mp?(e)g|avi|asf|ogg|class)" [gview]="*.@([ao]|so|so.!(conf|*/*)|[rs]pm|gif|jp?(e)g|mp3|mp?(e)g|avi|asf|ogg|class)" [qiv]="!*.@(gif|jp?(e)g|tif?(f)|png|p[bgp]m|bmp|x[bp]m|rle|rgb|pcx|fits|pm|svg)" [bzcat]="!*.?(t)bz?(2)" [pdftex]="!*.@(?(la)tex|texi|dtx|ins|ltx|dbj)" [rpm2cpio]="!*.[rs]pm" [view]="*.@([ao]|so|so.!(conf|*/*)|[rs]pm|gif|jp?(e)g|mp3|mp?(e)g|avi|asf|ogg|class)" [unxz]="!*.@(?(t)xz|tlz|lzma)" [ly2dvi]="!*.ly" [mozilla]="!*.@(?([xX]|[sS])[hH][tT][mM]?([lL]))" [modplugplay]="!*.@(669|abc|am[fs]|d[bs]m|dmf|far|it|mdl|m[eo]d|mid?(i)|mt[2m]|oct|okt?(a)|p[st]m|s[3t]m|ult|umx|wav|xm)" [dillo]="!*.@(?([xX]|[sS])[hH][tT][mM]?([lL]))" [aaxine]="!*@(.@(mp?(e)g|MP?(E)G|wm[av]|WM[AV]|avi|AVI|asf|vob|VOB|bin|dat|divx|DIVX|vcd|ps|pes|fli|flv|FLV|fxm|FXM|viv|rm|ram|yuv|mov|MOV|qt|QT|web[am]|WEB[AM]|mp[234]|MP[234]|m?(p)4[av]|M?(P)4[AV]|mkv|MKV|og[gmv]|OG[GMV]|t[ps]|T[PS]|m2t?(s)|M2T?(S)|mts|MTS|wav|WAV|flac|FLAC|asx|ASX|mng|MNG|srt|m[eo]d|M[EO]D|s[3t]m|S[3T]M|it|IT|xm|XM)|+([0-9]).@(vdr|VDR))?(.part)" [dvipdfmx]="!*.dvi" [advi]="!*.dvi" [lzmore]="!*.@(tlz|lzma)" [poedit]="!*.po" [firefox]="!*.@(?([xX]|[sS])[hH][tT][mM]?([lL])|[pP][dD][fF])" [gv]="!*.@(@(?(e)ps|?(E)PS|pdf|PDF)?(.gz|.GZ|.bz2|.BZ2|.Z))" [madplay]="!*.mp3" [gtranslator]="!*.po" [jadetex]="!*.@(?(la)tex|texi|dtx|ins|ltx|dbj)" [gpdf]="!*.[pf]df" [kghostview]="!*.@(@(?(e)ps|?(E)PS|pdf|PDF)?(.gz|.GZ|.bz2|.BZ2|.Z))" [pbzcat]="!*.?(t)bz?(2)" [lzcat]="!*.@(tlz|lzma)" [vim]="*.@([ao]|so|so.!(conf|*/*)|[rs]pm|gif|jp?(e)g|mp3|mp?(e)g|avi|asf|ogg|class)" [dvips]="!*.dvi" [pdfunite]="!*.pdf" [dvitype]="!*.dvi" [realplay]="!*.@(rm?(j)|ra?(m)|smi?(l))" [gqmpeg]="!*.@(mp3|ogg|pls|m3u)" [xelatex]="!*.@(?(la)tex|texi|dtx|ins|ltx|dbj)" [lzegrep]="!*.@(tlz|lzma)" [bunzip2]="!*.?(t)bz?(2)" [znew]="*.Z" [lokalize]="!*.po" [kate]="*.@([ao]|so|so.!(conf|*/*)|[rs]pm|gif|jp?(e)g|mp3|mp?(e)g|avi|asf|ogg|class)" [dragon]="!*@(.@(mp?(e)g|MP?(E)G|wm[av]|WM[AV]|avi|AVI|asf|vob|VOB|bin|dat|divx|DIVX|vcd|ps|pes|fli|flv|FLV|fxm|FXM|viv|rm|ram|yuv|mov|MOV|qt|QT|web[am]|WEB[AM]|mp[234]|MP[234]|m?(p)4[av]|M?(P)4[AV]|mkv|MKV|og[gmv]|OG[GMV]|t[ps]|T[PS]|m2t?(s)|M2T?(S)|mts|MTS|wav|WAV|flac|FLAC|asx|ASX|mng|MNG|srt|m[eo]d|M[EO]D|s[3t]m|S[3T]M|it|IT|xm|XM|iso|ISO)|+([0-9]).@(vdr|VDR))?(.part)" [pdflatex]="!*.@(?(la)tex|texi|dtx|ins|ltx|dbj)" [mozilla-firefox]="!*.@(?([xX]|[sS])[hH][tT][mM]?([lL])|[pP][dD][fF])" [ooimpress]="!*.@(sxi|sti|pps?(x)|ppt?([mx])|pot?([mx])|?(f)odp|otp)" [uncompress]="!*.Z" [unpigz]="!*.@(Z|[gGdz]z|t[ag]z)" [luatex]="!*.@(?(la)tex|texi|dtx|ins|ltx|dbj)" [lynx]="!*.@(?([xX]|[sS])[hH][tT][mM]?([lL]))" [ps2pdf]="!*.@(?(e)ps|pdf)" [mpg321]="!*.mp3" [mpg123]="!*.mp3" [pbunzip2]="!*.?(t)bz?(2)" [kid3]="!*.@(mp[234c]|og[ag]|@(fl|a)ac|m4[abp]|spx|tta|w?(a)v|wma|aif?(f)|asf|ape)" [pdfjadetex]="!*.@(?(la)tex|texi|dtx|ins|ltx|dbj)" [dvipdf]="!*.dvi" [gharbour]="!*.@([Pp][Rr][Gg]|[Cc][Ll][Pp])" [texi2html]="!*.texi*" [gunzip]="!*.@(Z|[gGd]z|t[ag]z)" [google-chrome]="!*.@(?([xX]|[sS])[hH][tT][mM]?([lL])|[pP][dD][fF])" [okular]="!*.@(okular|@(?(e|x)ps|?(E|X)PS|[pf]df|[PF]DF|dvi|DVI|cb[rz]|CB[RZ]|djv?(u)|DJV?(U)|dvi|DVI|gif|jp?(e)g|miff|tif?(f)|pn[gm]|p[bgp]m|bmp|xpm|ico|xwd|tga|pcx|GIF|JP?(E)G|MIFF|TIF?(F)|PN[GM]|P[BGP]M|BMP|XPM|ICO|XWD|TGA|PCX|epub|EPUB|odt|ODT|fb?(2)|FB?(2)|mobi|MOBI|g3|G3|chm|CHM)?(.?(gz|GZ|bz2|BZ2)))" [slitex]="!*.@(?(la)tex|texi|dtx|ins|ltx|dbj)" [xzcat]="!*.@(?(t)xz|tlz|lzma)" [timidity]="!*.@(mid?(i)|rmi|rcp|[gr]36|g18|mod|xm|it|x3m|s[3t]m|kar)" [dviselect]="!*.dvi" ) >colors=/root/.dircolors >new_dirs=/root/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share >__HOSTNAME () >{ > local zero=0; > local ret=0; > local cur_word="$2"; > if [ "$1" == "X" ]; then > return; > else > if [ "$1" == "match" ]; then > return 0; > else > if [ "$1" == "complete" ]; then > COMPREPLY=($(compgen -A hostname -- $cur_word)); > fi; > fi; > fi; > return 0 >} >__SIZE () >{ > return 0 >} >__SLAVEURL () >{ > return 0 >} >__VOLNAME () >{ > local zero=0; > local ret=0; > local cur_word="$2"; > local list=""; > if [ "X$1" == "X" ]; then > return; > else > if [ "$1" == "match" ]; then > return 0; > else > if [ "$1" == "complete" ]; then > if ! pidof glusterd > /dev/null 2>&1; then > list=''; > else > list=`gluster volume list 2> /dev/null`; > fi; > else > return 0; > fi; > fi; > fi; > COMPREPLY=($(compgen -W "$list" -- $cur_word)); > return 0 >} >__expand_tilde_by_ref () >{ > if [[ ${!1} == \~* ]]; then > if [[ ${!1} == */* ]]; then > eval $1="${!1/%\/*}"/'${!1#*/}'; > else > eval $1="${!1}"; > fi; > fi >} >__get_cword_at_cursor_by_ref () >{ > local cword words=(); > __reassemble_comp_words_by_ref "$1" words cword; > local i cur index=$COMP_POINT lead=${COMP_LINE:0:$COMP_POINT}; > if [[ $index -gt 0 && ( -n $lead && -n ${lead//[[:space:]]} ) ]]; then > cur=$COMP_LINE; > for ((i = 0; i <= cword; ++i )) > do > while [[ ${#cur} -ge ${#words[i]} && "${cur:0:${#words[i]}}" != "${words[i]}" ]]; do > cur="${cur:1}"; > [[ $index -gt 0 ]] && ((index--)); > done; > if [[ $i -lt $cword ]]; then > local old_size=${#cur}; > cur="${cur#"${words[i]}"}"; > local new_size=${#cur}; > index=$(( index - old_size + new_size )); > fi; > done; > [[ -n $cur && ! -n ${cur//[[:space:]]} ]] && cur=; > [[ $index -lt 0 ]] && index=0; > fi; > local "$2" "$3" "$4" && _upvars -a${#words[@]} $2 "${words[@]}" -v $3 "$cword" -v $4 "${cur:0:$index}" >} >__load_completion () >{ > local -a dirs=(${BASH_COMPLETION_USER_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion}/completions); > local OIFS=$IFS IFS=: dir cmd="$1" compfile; > for dir in ${XDG_DATA_DIRS:-/usr/local/share:/usr/share}; > do > dirs+=($dir/bash-completion/completions); > done; > IFS=$OIFS; > if [[ $BASH_SOURCE == */* ]]; then > dirs+=("${BASH_SOURCE%/*}/completions"); > else > dirs+=(./completions); > fi; > for dir in "${dirs[@]}"; > do > for compfile in "${cmd##*/}" "${cmd##*/}".bash _"${cmd##*/}"; > do > compfile="$dir/$compfile"; > [[ -f "$compfile" ]] && . "$compfile" &> /dev/null && return 0; > done; > done; > return 1 >} >__ltrim_colon_completions () >{ > if [[ "$1" == *:* && "$COMP_WORDBREAKS" == *:* ]]; then > local colon_word=${1%"${1##*:}"}; > local i=${#COMPREPLY[*]}; > while [[ $((--i)) -ge 0 ]]; do > COMPREPLY[$i]=${COMPREPLY[$i]#"$colon_word"}; > done; > fi >} >__parse_options () >{ > local option option2 i IFS=' >,/|'; > option=; > local -a array; > read -a array <<< "$1"; > for i in "${array[@]}"; > do > case "$i" in > ---*) > break > ;; > --?*) > option=$i; > break > ;; > -?*) > [[ -n $option ]] || option=$i > ;; > *) > break > ;; > esac; > done; > [[ -n $option ]] || return; > IFS=' >'; > if [[ $option =~ (\[((no|dont)-?)\]). ]]; then > option2=${option/"${BASH_REMATCH[1]}"/}; > option2=${option2%%[<{().[]*}; > printf '%s\n' "${option2/=*/=}"; > option=${option/"${BASH_REMATCH[1]}"/"${BASH_REMATCH[2]}"}; > fi; > option=${option%%[<{().[]*}; > printf '%s\n' "${option/=*/=}" >} >__parse_vdo_options () >{ > local option option2 i IFS=',/|'; > option=; > local -a array; > if [[ $1 =~ --[A-Za-z0-9]+ ]]; then > read -a array <<< "${BASH_REMATCH[0]}"; > fi; > for i in "${array[@]}"; > do > case "$i" in > ---*) > break > ;; > --?*) > option=$i; > break > ;; > -?*) > [[ -n $option ]] || option=$i > ;; > *) > break > ;; > esac; > done; > [[ -n $option ]] || return; > IFS=' > '; > if [[ $option =~ (\[((no|dont)-?)\]). ]]; then > option2=${option/"${BASH_REMATCH[1]}"/}; > option2=${option2%%[<{().[]*}; > printf '%s\n' "${option2/=*/=}"; > option=${option/"${BASH_REMATCH[1]}"/"${BASH_REMATCH[2]}"}; > fi; > option=${option%%[<{().[]*}; > printf '%s\n' "${option/=*/=}" >} >__reassemble_comp_words_by_ref () >{ > local exclude i j line ref; > if [[ -n $1 ]]; then > exclude="${1//[^$COMP_WORDBREAKS]}"; > fi; > printf -v "$3" %s "$COMP_CWORD"; > if [[ -n $exclude ]]; then > line=$COMP_LINE; > for ((i=0, j=0; i < ${#COMP_WORDS[@]}; i++, j++)) > do > while [[ $i -gt 0 && ${COMP_WORDS[$i]} == +([$exclude]) ]]; do > [[ $line != [[:blank:]]* ]] && (( j >= 2 )) && ((j--)); > ref="$2[$j]"; > printf -v "$ref" %s "${!ref}${COMP_WORDS[i]}"; > [[ $i == $COMP_CWORD ]] && printf -v "$3" %s "$j"; > line=${line#*"${COMP_WORDS[$i]}"}; > [[ $line == [[:blank:]]* ]] && ((j++)); > (( $i < ${#COMP_WORDS[@]} - 1)) && ((i++)) || break 2; > done; > ref="$2[$j]"; > printf -v "$ref" %s "${!ref}${COMP_WORDS[i]}"; > line=${line#*"${COMP_WORDS[i]}"}; > [[ $i == $COMP_CWORD ]] && printf -v "$3" %s "$j"; > done; > [[ $i == $COMP_CWORD ]] && printf -v "$3" %s "$j"; > else > for i in ${!COMP_WORDS[@]}; > do > printf -v "$2[i]" %s "${COMP_WORDS[i]}"; > done; > fi >} >_allowed_groups () >{ > if _complete_as_root; then > local IFS=' >'; > COMPREPLY=($( compgen -g -- "$1" )); > else > local IFS=' > '; > COMPREPLY=($( compgen -W "$( id -Gn 2>/dev/null || groups 2>/dev/null )" -- "$1" )); > fi >} >_allowed_users () >{ > if _complete_as_root; then > local IFS=' >'; > COMPREPLY=($( compgen -u -- "${1:-$cur}" )); > else > local IFS=' > '; > COMPREPLY=($( compgen -W "$( id -un 2>/dev/null || whoami 2>/dev/null )" -- "${1:-$cur}" )); > fi >} >_authselect_completions () >{ > local COMMANDS; > local command; > local possibleopts; > function is_valid_command () > { > local cmd; > for cmd in "${COMMANDS[@]}"; > do > if [[ "$cmd" = "$1" ]]; then > return 0; > fi; > done; > return 1 > }; > function get_command () > { > local opt; > if [[ $COMP_CWORD -lt 2 ]]; then > return; > fi; > for opt in "${COMP_WORDS[@]:0:$COMP_CWORD}"; > do > if is_valid_command "$opt"; then > echo "$opt"; > return; > fi; > done > }; > function get_command_param () > { > local havecmd=0; > local len=${#COMP_WORDS[@]}-1; > if [[ "$command" = "" ]]; then > return; > fi; > havecmd=0; > for ((i=0; i<$len; i++ )) > do > if [[ "$havecmd" = "1" ]]; then > if [[ "${COMP_WORDS[$i]}" =~ ^[-=] || "${COMP_WORDS[$i-1]}" = "=" ]]; then > continue; > fi; > echo "${COMP_WORDS[$i]}"; > return; > fi; > if [[ "${COMP_WORDS[$i]}" = "$command" ]]; then > havecmd=1; > fi; > done > }; > function get_profile () > { > case "$command" in > select | show | requirements | test | list-features) > get_command_param > ;; > enable-feature | disable-feature) > authselect current 2> /dev/null | head -n1 | cut -d" " -f3 > ;; > esac > }; > function get_command_keywords () > { > local profile; > case "$command" in > select | requirements | test) > profile="$(get_profile)"; > if [[ "$profile" != "" ]]; then > authselect list-features "$profile" 2> /dev/null; > fi > ;; > esac > }; > function get_command_options () > { > if [[ "${COMP_WORDS[$COMP_CWORD]}" =~ ^- ]]; then > case "$command" in > select) > echo "--force --quiet --nobackup --backup=" > ;; > apply-changes | disable-feature) > echo "--backup=" > ;; > enable-feature) > echo "--backup= --quiet" > ;; > current | backup-list) > echo "--raw" > ;; > create-profile) > echo "--vendor --base-on= --base-on-default" "--symlink-meta --symlink-nsswitch --symlink-pam" "--symlink-dconf --symlink=" > ;; > test) > echo "--all --nsswitch --system-auth --password-auth" "--smartcard-auth --fingerprint-auth --postlogin" "--dconf-db --dconf-lock" > ;; > esac; > fi > }; > function get_global_options () > { > if [[ "${COMP_WORDS[$COMP_CWORD]}" =~ ^- ]]; then > echo "--debug --trace --warn --help"; > fi > }; > function get_option_params () > { > local opt; > if [[ $COMP_CWORD -gt 2 && "${COMP_WORDS[$COMP_CWORD-1]}" = "=" ]]; then > opt="${COMP_WORDS[$COMP_CWORD-2]}"; > else > if [[ $COMP_CWORD -gt 1 ]]; then > opt="${COMP_WORDS[$COMP_CWORD-1]}"; > fi; > fi; > case "$opt" in > --base-on) > authselect list 2> /dev/null | cut -d" " -f2 > ;; > --symlink) > echo "dconf-db dconf-locks fingerprint-auth nsswitch.conf" "password-auth postlogin smartcard-auth system-auth" "README REQUIREMENTS" > ;; > esac > }; > function get_command_params () > { > local i; > local profile; > if [[ "$command" = "" ]]; then > return; > fi; > for ((i=$COMP_CWORD-1; i>1; i-- )) > do > opt="${COMP_WORDS[$i]}"; > if [[ "$opt" = "$command" ]]; then > break; > fi; > if [[ "$opt" =~ ^[-=] || "${COMP_WORDS[$i-1]}" = "=" ]]; then > continue; > fi; > return; > done; > case "$command" in > select | show | requirements | test | list-features) > authselect list 2> /dev/null | cut -d" " -f2 > ;; > backup-remove | backup-restore) > authselect backup-list 2> /dev/null | cut -d" " -f1 > ;; > enable-feature | disable-feature) > profile="$(get_profile)"; > if [[ "$profile" != "" ]]; then > authselect list-features "$profile" 2> /dev/null; > fi > ;; > esac > }; > COMMANDS=(select apply-changes list list-features show requirements current check test enable-feature disable-feature create-profile backup-list backup-remove backup-restore); > possibleopts="$(get_option_params)"; > if [[ "$possibleopts" != "" ]]; then > if [[ "${COMP_WORDS[$COMP_CWORD]}" = "=" ]]; then > COMPREPLY=($(compgen -W "$possibleopts")); > else > COMPREPLY=($(compgen -W "$possibleopts" -- "${COMP_WORDS[$COMP_CWORD]}")); > fi; > else > command="$(get_command)"; > if [[ "$command" = "" ]]; then > possibleopts="$(get_global_options) ${COMMANDS[@]}"; > else > possibleopts="$(get_global_options) $(get_command_params) $(get_command_keywords) $(get_command_options)"; > fi; > COMPREPLY=($(compgen -W "$possibleopts" -- "${COMP_WORDS[$COMP_CWORD]}")); > fi >} >_available_interfaces () >{ > local cmd PATH=$PATH:/sbin; > if [[ ${1:-} == -w ]]; then > cmd="iwconfig"; > else > if [[ ${1:-} == -a ]]; then > cmd="{ ifconfig || ip link show up; }"; > else > cmd="{ ifconfig -a || ip link show; }"; > fi; > fi; > COMPREPLY=($( eval $cmd 2>/dev/null | awk '/^[^ \t]/ { if ($1 ~ /^[0-9]+:/) { print $2 } else { print $1 } }' )); > COMPREPLY=($( compgen -W '${COMPREPLY[@]/%[[:punct:]]/}' -- "$cur" )) >} >_bpftool () >{ > local cur prev words objword; > _init_completion || return; > if [[ ${words[cword]} == -* ]]; then > local c='--version --json --pretty --bpffs --mapcompat --debug'; > COMPREPLY=($( compgen -W "$c" -- "$cur" )); > return 0; > fi; > case $prev in > help | hex | opcodes | visual | linum) > return 0 > ;; > tag) > _bpftool_get_prog_tags; > return 0 > ;; > dev) > _sysfs_get_netdevs; > return 0 > ;; > file | pinned) > _filedir; > return 0 > ;; > batch) > COMPREPLY=($( compgen -W 'file' -- "$cur" )); > return 0 > ;; > esac; > local i; > for ((i=1; i < ${#words[@]}; 1)) > do > if [[ ${words[i]::1} == - ]]; then > words=("${words[@]:0:i}" "${words[@]:i+1}"); > [[ $i -le $cword ]] && cword=$(( cword - 1 )); > else > i=$(( ++i )); > fi; > done; > cur=${words[cword]}; > prev=${words[cword - 1]}; > pprev=${words[cword - 2]}; > local object=${words[1]} command=${words[2]}; > if [[ -z $object || $cword -eq 1 ]]; then > case $cur in > *) > COMPREPLY=($( compgen -W "$( bpftool help 2>&1 | command sed -e '/OBJECT := /!d' -e 's/.*{//' -e 's/}.*//' -e 's/|//g' )" -- "$cur" )); > COMPREPLY+=($( compgen -W 'batch help' -- "$cur" )); > return 0 > ;; > esac; > fi; > [[ $command == help ]] && return 0; > case $object in > prog) > case $command in > show | list | dump | pin) > case $prev in > id) > _bpftool_get_prog_ids; > return 0 > ;; > name) > _bpftool_get_prog_names; > return 0 > ;; > esac > ;; > esac; > local PROG_TYPE='id pinned tag name'; > local MAP_TYPE='id pinned name'; > local METRIC_TYPE='cycles instructions l1d_loads llc_misses'; > case $command in > show | list) > [[ $prev != "$command" ]] && return 0; > COMPREPLY=($( compgen -W "$PROG_TYPE" -- "$cur" )); > return 0 > ;; > dump) > case $prev in > $command) > COMPREPLY+=($( compgen -W "xlated jited" -- "$cur" )); > return 0 > ;; > xlated | jited) > COMPREPLY=($( compgen -W "$PROG_TYPE" -- "$cur" )); > return 0 > ;; > *) > _bpftool_once_attr 'file'; > if _bpftool_search_list 'xlated'; then > COMPREPLY+=($( compgen -W 'opcodes visual linum' -- "$cur" )); > else > COMPREPLY+=($( compgen -W 'opcodes linum' -- "$cur" )); > fi; > return 0 > ;; > esac > ;; > pin) > if [[ $prev == "$command" ]]; then > COMPREPLY=($( compgen -W "$PROG_TYPE" -- "$cur" )); > else > _filedir; > fi; > return 0 > ;; > attach | detach) > case $cword in > 3) > COMPREPLY=($( compgen -W "$PROG_TYPE" -- "$cur" )); > return 0 > ;; > 4) > case $prev in > id) > _bpftool_get_prog_ids > ;; > name) > _bpftool_get_prog_names > ;; > pinned) > _filedir > ;; > esac; > return 0 > ;; > 5) > COMPREPLY=($( compgen -W 'msg_verdict stream_verdict \ > stream_parser flow_dissector' -- "$cur" )); > return 0 > ;; > 6) > COMPREPLY=($( compgen -W "$MAP_TYPE" -- "$cur" )); > return 0 > ;; > 7) > case $prev in > id) > _bpftool_get_map_ids > ;; > name) > _bpftool_get_map_names > ;; > pinned) > _filedir > ;; > esac; > return 0 > ;; > esac > ;; > load | loadall) > local obj; > if [[ ${#words[@]} -eq 3 ]]; then > COMPREPLY=($( compgen -W "load loadall" -- "$cur" )); > return 0; > fi; > if [[ ${#words[@]} -lt 6 ]]; then > _filedir; > return 0; > fi; > obj=${words[3]}; > if [[ ${words[-4]} == "map" ]]; then > COMPREPLY=($( compgen -W "id pinned" -- "$cur" )); > return 0; > fi; > if [[ ${words[-3]} == "map" ]]; then > if [[ ${words[-2]} == "idx" ]]; then > _bpftool_get_obj_map_idxs $obj; > else > if [[ ${words[-2]} == "name" ]]; then > _bpftool_get_obj_map_names $obj; > fi; > fi; > return 0; > fi; > if [[ ${words[-2]} == "map" ]]; then > COMPREPLY=($( compgen -W "idx name" -- "$cur" )); > return 0; > fi; > case $prev in > type) > COMPREPLY=($( compgen -W "socket kprobe kretprobe classifier flow_dissector action tracepoint raw_tracepoint xdp perf_event cgroup/skb cgroup/sock cgroup/dev lwt_in lwt_out lwt_xmit lwt_seg6local sockops sk_skb sk_msg lirc_mode2 cgroup/bind4 cgroup/bind6 cgroup/connect4 cgroup/connect6 cgroup/sendmsg4 cgroup/sendmsg6 cgroup/recvmsg4 cgroup/recvmsg6 cgroup/post_bind4 cgroup/post_bind6 cgroup/sysctl cgroup/getsockopt cgroup/setsockopt struct_ops fentry fexit freplace" -- "$cur" )); > return 0 > ;; > id) > _bpftool_get_map_ids; > return 0 > ;; > name) > _bpftool_get_map_names; > return 0 > ;; > pinned | pinmaps) > _filedir; > return 0 > ;; > *) > COMPREPLY=($( compgen -W "map" -- "$cur" )); > _bpftool_once_attr 'type'; > _bpftool_once_attr 'dev'; > _bpftool_once_attr 'pinmaps'; > return 0 > ;; > esac > ;; > tracelog) > return 0 > ;; > profile) > case $cword in > 3) > COMPREPLY=($( compgen -W "$PROG_TYPE" -- "$cur" )); > return 0 > ;; > 4) > case $prev in > id) > _bpftool_get_prog_ids > ;; > name) > _bpftool_get_prog_names > ;; > pinned) > _filedir > ;; > esac; > return 0 > ;; > 5) > COMPREPLY=($( compgen -W "$METRIC_TYPE duration" -- "$cur" )); > return 0 > ;; > 6) > case $prev in > duration) > return 0 > ;; > *) > COMPREPLY=($( compgen -W "$METRIC_TYPE" -- "$cur" )); > return 0 > ;; > esac; > return 0 > ;; > *) > COMPREPLY=($( compgen -W "$METRIC_TYPE" -- "$cur" )); > return 0 > ;; > esac > ;; > run) > if [[ ${#words[@]} -eq 4 ]]; then > COMPREPLY=($( compgen -W "$PROG_TYPE" -- "$cur" )); > return 0; > fi; > case $prev in > id) > _bpftool_get_prog_ids; > return 0 > ;; > name) > _bpftool_get_prog_names; > return 0 > ;; > data_in | data_out | ctx_in | ctx_out) > _filedir; > return 0 > ;; > repeat | data_size_out | ctx_size_out) > return 0 > ;; > *) > _bpftool_once_attr 'data_in data_out data_size_out \ > ctx_in ctx_out ctx_size_out repeat'; > return 0 > ;; > esac > ;; > *) > [[ $prev == $object ]] && COMPREPLY=($( compgen -W 'dump help pin attach detach \ > load loadall show list tracelog run profile' -- "$cur" )) > ;; > esac > ;; > struct_ops) > local STRUCT_OPS_TYPE='id name'; > case $command in > show | list | dump | unregister) > case $prev in > $command) > COMPREPLY=($( compgen -W "$STRUCT_OPS_TYPE" -- "$cur" )) > ;; > id) > _bpftool_get_map_ids_for_type struct_ops > ;; > name) > _bpftool_get_map_names_for_type struct_ops > ;; > esac; > return 0 > ;; > register) > _filedir; > return 0 > ;; > *) > [[ $prev == $object ]] && COMPREPLY=($( compgen -W 'register unregister show list dump help' -- "$cur" )) > ;; > esac > ;; > map) > local MAP_TYPE='id pinned name'; > case $command in > show | list | dump | peek | pop | dequeue | freeze) > case $prev in > $command) > COMPREPLY=($( compgen -W "$MAP_TYPE" -- "$cur" )); > return 0 > ;; > id) > case "$command" in > peek) > _bpftool_get_map_ids_for_type stack; > _bpftool_get_map_ids_for_type queue > ;; > pop) > _bpftool_get_map_ids_for_type stack > ;; > dequeue) > _bpftool_get_map_ids_for_type queue > ;; > *) > _bpftool_get_map_ids > ;; > esac; > return 0 > ;; > name) > case "$command" in > peek) > _bpftool_get_map_names_for_type stack; > _bpftool_get_map_names_for_type queue > ;; > pop) > _bpftool_get_map_names_for_type stack > ;; > dequeue) > _bpftool_get_map_names_for_type queue > ;; > *) > _bpftool_get_map_names > ;; > esac; > return 0 > ;; > *) > return 0 > ;; > esac > ;; > create) > case $prev in > $command) > _filedir; > return 0 > ;; > type) > COMPREPLY=($( compgen -W 'hash array prog_array \ > perf_event_array percpu_hash percpu_array \ > stack_trace cgroup_array lru_hash \ > lru_percpu_hash lpm_trie array_of_maps \ > hash_of_maps devmap devmap_hash sockmap cpumap \ > xskmap sockhash cgroup_storage reuseport_sockarray \ > percpu_cgroup_storage queue stack' -- "$cur" )); > return 0 > ;; > key | value | flags | name | entries) > return 0 > ;; > *) > _bpftool_once_attr 'type'; > _bpftool_once_attr 'key'; > _bpftool_once_attr 'value'; > _bpftool_once_attr 'entries'; > _bpftool_once_attr 'name'; > _bpftool_once_attr 'flags'; > _bpftool_once_attr 'dev'; > return 0 > ;; > esac > ;; > lookup | getnext | delete) > case $prev in > $command) > COMPREPLY=($( compgen -W "$MAP_TYPE" -- "$cur" )); > return 0 > ;; > id) > _bpftool_get_map_ids; > return 0 > ;; > name) > _bpftool_get_map_names; > return 0 > ;; > key) > COMPREPLY+=($( compgen -W 'hex' -- "$cur" )) > ;; > *) > case $(_bpftool_map_guess_map_type) in > queue | stack) > return 0 > ;; > esac; > _bpftool_once_attr 'key'; > return 0 > ;; > esac > ;; > update | push | enqueue) > case $prev in > $command) > COMPREPLY=($( compgen -W "$MAP_TYPE" -- "$cur" )); > return 0 > ;; > id) > _bpftool_map_update_get_id $command; > return 0 > ;; > name) > _bpftool_map_update_get_name $command; > return 0 > ;; > key) > COMPREPLY+=($( compgen -W 'hex' -- "$cur" )) > ;; > value) > case "$(_bpftool_map_guess_map_type)" in > array_of_maps | hash_of_maps) > local MAP_TYPE='id pinned name'; > COMPREPLY+=($( compgen -W "$MAP_TYPE" -- "$cur" )); > return 0 > ;; > prog_array) > local PROG_TYPE='id pinned tag name'; > COMPREPLY+=($( compgen -W "$PROG_TYPE" -- "$cur" )); > return 0 > ;; > *) > COMPREPLY+=($( compgen -W 'hex' -- "$cur" )); > return 0 > ;; > esac; > return 0 > ;; > *) > case $(_bpftool_map_guess_map_type) in > queue | stack) > _bpftool_once_attr 'value'; > return 0 > ;; > esac; > _bpftool_once_attr 'key'; > local UPDATE_FLAGS='any exist noexist'; > for ((idx=3; idx < ${#words[@]}-1; idx++ )) > do > if [[ ${words[idx]} == 'value' ]]; then > _bpftool_one_of_list "$UPDATE_FLAGS"; > return 0; > fi; > done; > for ((idx=3; idx < ${#words[@]}-1; idx++ )) > do > if [[ ${words[idx]} == 'key' ]]; then > _bpftool_once_attr 'value'; > return 0; > fi; > done; > return 0 > ;; > esac > ;; > pin) > case $prev in > $command) > COMPREPLY=($( compgen -W "$MAP_TYPE" -- "$cur" )) > ;; > id) > _bpftool_get_map_ids > ;; > name) > _bpftool_get_map_names > ;; > esac; > return 0 > ;; > event_pipe) > case $prev in > $command) > COMPREPLY=($( compgen -W "$MAP_TYPE" -- "$cur" )); > return 0 > ;; > id) > _bpftool_get_map_ids_for_type perf_event_array; > return 0 > ;; > name) > _bpftool_get_map_names_for_type perf_event_array; > return 0 > ;; > cpu) > return 0 > ;; > index) > return 0 > ;; > *) > _bpftool_once_attr 'cpu'; > _bpftool_once_attr 'index'; > return 0 > ;; > esac > ;; > *) > [[ $prev == $object ]] && COMPREPLY=($( compgen -W 'delete dump getnext help \ > lookup pin event_pipe show list update create \ > peek push enqueue pop dequeue freeze' -- "$cur" )) > ;; > esac > ;; > btf) > local PROG_TYPE='id pinned tag name'; > local MAP_TYPE='id pinned name'; > case $command in > dump) > case $prev in > $command) > COMPREPLY+=($( compgen -W "id map prog file" -- "$cur" )); > return 0 > ;; > prog) > COMPREPLY=($( compgen -W "$PROG_TYPE" -- "$cur" )); > return 0 > ;; > map) > COMPREPLY=($( compgen -W "$MAP_TYPE" -- "$cur" )); > return 0 > ;; > id) > case $pprev in > prog) > _bpftool_get_prog_ids > ;; > map) > _bpftool_get_map_ids > ;; > $command) > _bpftool_get_btf_ids > ;; > esac; > return 0 > ;; > name) > case $pprev in > prog) > _bpftool_get_prog_names > ;; > map) > _bpftool_get_map_names > ;; > esac; > return 0 > ;; > format) > COMPREPLY=($( compgen -W "c raw" -- "$cur" )) > ;; > *) > case ${words[3]} in > id | file) > _bpftool_once_attr 'format' > ;; > map | prog) > if [[ ${words[3]} == "map" ]] && [[ $cword == 6 ]]; then > COMPREPLY+=($( compgen -W "key value kv all" -- "$cur" )); > fi; > _bpftool_once_attr 'format' > ;; > *) > > ;; > esac; > return 0 > ;; > esac > ;; > show | list) > case $prev in > $command) > COMPREPLY+=($( compgen -W "id" -- "$cur" )) > ;; > id) > _bpftool_get_btf_ids > ;; > esac; > return 0 > ;; > *) > [[ $prev == $object ]] && COMPREPLY=($( compgen -W 'dump help show list' -- "$cur" )) > ;; > esac > ;; > gen) > case $command in > skeleton) > _filedir > ;; > *) > [[ $prev == $object ]] && COMPREPLY=($( compgen -W 'skeleton help' -- "$cur" )) > ;; > esac > ;; > cgroup) > case $command in > show | list | tree) > case $cword in > 3) > _filedir > ;; > 4) > COMPREPLY=($( compgen -W 'effective' -- "$cur" )) > ;; > esac; > return 0 > ;; > attach | detach) > local ATTACH_TYPES='ingress egress sock_create sock_ops \ > device bind4 bind6 post_bind4 post_bind6 connect4 \ > connect6 sendmsg4 sendmsg6 recvmsg4 recvmsg6 sysctl \ > getsockopt setsockopt'; > local ATTACH_FLAGS='multi override'; > local PROG_TYPE='id pinned tag name'; > case $prev in > $command) > _filedir; > return 0 > ;; > ingress | egress | sock_create | sock_ops | device | bind4 | bind6 | post_bind4 | post_bind6 | connect4 | connect6 | sendmsg4 | sendmsg6 | recvmsg4 | recvmsg6 | sysctl | getsockopt | setsockopt) > COMPREPLY=($( compgen -W "$PROG_TYPE" -- "$cur" )); > return 0 > ;; > id) > _bpftool_get_prog_ids; > return 0 > ;; > *) > if ! _bpftool_search_list "$ATTACH_TYPES"; then > COMPREPLY=($( compgen -W "$ATTACH_TYPES" -- "$cur" )); > else > if [[ "$command" == "attach" ]]; then > _bpftool_one_of_list "$ATTACH_FLAGS"; > fi; > fi; > return 0 > ;; > esac > ;; > *) > [[ $prev == $object ]] && COMPREPLY=($( compgen -W 'help attach detach \ > show list tree' -- "$cur" )) > ;; > esac > ;; > perf) > case $command in > *) > [[ $prev == $object ]] && COMPREPLY=($( compgen -W 'help \ > show list' -- "$cur" )) > ;; > esac > ;; > net) > local PROG_TYPE='id pinned tag name'; > local ATTACH_TYPES='xdp xdpgeneric xdpdrv xdpoffload'; > case $command in > show | list) > [[ $prev != "$command" ]] && return 0; > COMPREPLY=($( compgen -W 'dev' -- "$cur" )); > return 0 > ;; > attach) > case $cword in > 3) > COMPREPLY=($( compgen -W "$ATTACH_TYPES" -- "$cur" )); > return 0 > ;; > 4) > COMPREPLY=($( compgen -W "$PROG_TYPE" -- "$cur" )); > return 0 > ;; > 5) > case $prev in > id) > _bpftool_get_prog_ids > ;; > name) > _bpftool_get_prog_names > ;; > pinned) > _filedir > ;; > esac; > return 0 > ;; > 6) > COMPREPLY=($( compgen -W 'dev' -- "$cur" )); > return 0 > ;; > 8) > _bpftool_once_attr 'overwrite'; > return 0 > ;; > esac > ;; > detach) > case $cword in > 3) > COMPREPLY=($( compgen -W "$ATTACH_TYPES" -- "$cur" )); > return 0 > ;; > 4) > COMPREPLY=($( compgen -W 'dev' -- "$cur" )); > return 0 > ;; > esac > ;; > *) > [[ $prev == $object ]] && COMPREPLY=($( compgen -W 'help \ > show list attach detach' -- "$cur" )) > ;; > esac > ;; > feature) > case $command in > probe) > [[ $prev == "prefix" ]] && return 0; > if _bpftool_search_list 'macros'; then > _bpftool_once_attr 'prefix'; > else > COMPREPLY+=($( compgen -W 'macros' -- "$cur" )); > fi; > _bpftool_one_of_list 'kernel dev'; > _bpftool_once_attr 'full'; > return 0 > ;; > *) > [[ $prev == $object ]] && COMPREPLY=($( compgen -W 'help probe' -- "$cur" )) > ;; > esac > ;; > esac >} >_bpftool_get_btf_ids () >{ > COMPREPLY+=($( compgen -W "$( bpftool -jp btf 2>&1 | command sed -n 's/.*"id": \(.*\),$/\1/p' )" -- "$cur" )) >} >_bpftool_get_map_ids () >{ > COMPREPLY+=($( compgen -W "$( bpftool -jp map 2>&1 | command sed -n 's/.*"id": \(.*\),$/\1/p' )" -- "$cur" )) >} >_bpftool_get_map_ids_for_type () >{ > local type="$1"; > COMPREPLY+=($( compgen -W "$( bpftool -jp map 2>&1 | command grep -C2 "$type" | command sed -n 's/.*"id": \(.*\),$/\1/p' )" -- "$cur" )) >} >_bpftool_get_map_names () >{ > COMPREPLY+=($( compgen -W "$( bpftool -jp map 2>&1 | command sed -n 's/.*"name": \(.*\),$/\1/p' )" -- "$cur" )) >} >_bpftool_get_map_names_for_type () >{ > local type="$1"; > COMPREPLY+=($( compgen -W "$( bpftool -jp map 2>&1 | command grep -C2 "$type" | command sed -n 's/.*"name": \(.*\),$/\1/p' )" -- "$cur" )) >} >_bpftool_get_obj_map_idxs () >{ > local obj; > obj=$1; > nmaps=$(objdump -j maps -t $obj 2>/dev/null | grep -c 'g . maps'); > COMPREPLY+=($( compgen -W "$(seq 0 $((nmaps - 1)))" -- "$cur" )) >} >_bpftool_get_obj_map_names () >{ > local obj; > obj=$1; > maps=$(objdump -j maps -t $obj 2>/dev/null | command awk '/g . maps/ {print $NF}'); > COMPREPLY+=($( compgen -W "$maps" -- "$cur" )) >} >_bpftool_get_prog_ids () >{ > COMPREPLY+=($( compgen -W "$( bpftool -jp prog 2>&1 | command sed -n 's/.*"id": \(.*\),$/\1/p' )" -- "$cur" )) >} >_bpftool_get_prog_names () >{ > COMPREPLY+=($( compgen -W "$( bpftool -jp prog 2>&1 | command sed -n 's/.*"name": "\(.*\)",$/\1/p' )" -- "$cur" )) >} >_bpftool_get_prog_tags () >{ > COMPREPLY+=($( compgen -W "$( bpftool -jp prog 2>&1 | command sed -n 's/.*"tag": "\(.*\)",$/\1/p' )" -- "$cur" )) >} >_bpftool_map_guess_map_type () >{ > local keyword ref; > for ((idx=3; idx < ${#words[@]}-1; idx++ )) > do > case "${words[$((idx-2))]}" in > lookup | update) > keyword=${words[$((idx-1))]}; > ref=${words[$((idx))]} > ;; > push) > printf "stack"; > return 0 > ;; > enqueue) > printf "queue"; > return 0 > ;; > esac; > done; > [[ -z $ref ]] && return 0; > local type; > type=$(bpftool -jp map show $keyword $ref | command sed -n 's/.*"type": "\(.*\)",$/\1/p'); > [[ -n $type ]] && printf $type >} >_bpftool_map_update_get_id () >{ > local command="$1"; > local idx value; > for ((idx=7; idx < ${#words[@]}-1; idx++ )) > do > if [[ ${words[idx]} == "value" ]]; then > value=1; > break; > fi; > done; > if [[ $value -eq 0 ]]; then > case "$command" in > push) > _bpftool_get_map_ids_for_type stack > ;; > enqueue) > _bpftool_get_map_ids_for_type queue > ;; > *) > _bpftool_get_map_ids > ;; > esac; > return 0; > fi; > local type=$(_bpftool_map_guess_map_type); > case $type in > array_of_maps | hash_of_maps) > _bpftool_get_map_ids; > return 0 > ;; > prog_array) > _bpftool_get_prog_ids; > return 0 > ;; > *) > return 0 > ;; > esac >} >_bpftool_map_update_get_name () >{ > local command="$1"; > local idx value; > for ((idx=7; idx < ${#words[@]}-1; idx++ )) > do > if [[ ${words[idx]} == "value" ]]; then > value=1; > break; > fi; > done; > if [[ $value -eq 0 ]]; then > case "$command" in > push) > _bpftool_get_map_names_for_type stack > ;; > enqueue) > _bpftool_get_map_names_for_type queue > ;; > *) > _bpftool_get_map_names > ;; > esac; > return 0; > fi; > local type=$(_bpftool_map_guess_map_type); > case $type in > array_of_maps | hash_of_maps) > _bpftool_get_map_names; > return 0 > ;; > prog_array) > _bpftool_get_prog_names; > return 0 > ;; > *) > return 0 > ;; > esac >} >_bpftool_once_attr () >{ > local w idx found; > for w in $*; > do > found=0; > for ((idx=3; idx < ${#words[@]}-1; idx++ )) > do > if [[ $w == ${words[idx]} ]]; then > found=1; > break; > fi; > done; > [[ $found -eq 0 ]] && COMPREPLY+=($( compgen -W "$w" -- "$cur" )); > done >} >_bpftool_one_of_list () >{ > _bpftool_search_list $* && return 1; > COMPREPLY+=($( compgen -W "$*" -- "$cur" )) >} >_bpftool_search_list () >{ > local w idx; > for w in $*; > do > for ((idx=3; idx < ${#words[@]}-1; idx++ )) > do > [[ $w == ${words[idx]} ]] && return 0; > done; > done; > return 1 >} >_cd () >{ > local cur prev words cword; > _init_completion || return; > local IFS=' >' i j k; > compopt -o filenames; > if [[ -z "${CDPATH:-}" || "$cur" == ?(.)?(.)/* ]]; then > _filedir -d; > return; > fi; > local -r mark_dirs=$(_rl_enabled mark-directories && echo y); > local -r mark_symdirs=$(_rl_enabled mark-symlinked-directories && echo y); > for i in ${CDPATH//:/' >'}; > do > k="${#COMPREPLY[@]}"; > for j in $( compgen -d -- $i/$cur ); > do > if [[ ( -n $mark_symdirs && -h $j || -n $mark_dirs && ! -h $j ) && ! -d ${j#$i/} ]]; then > j+="/"; > fi; > COMPREPLY[k++]=${j#$i/}; > done; > done; > _filedir -d; > if [[ ${#COMPREPLY[@]} -eq 1 ]]; then > i=${COMPREPLY[0]}; > if [[ "$i" == "$cur" && $i != "*/" ]]; then > COMPREPLY[0]="${i}/"; > fi; > fi; > return >} >_cd_devices () >{ > COMPREPLY+=($( compgen -f -d -X "!*/?([amrs])cd*" -- "${cur:-/dev/}" )) >} >_command () >{ > local offset i; > offset=1; > for ((i=1; i <= COMP_CWORD; i++ )) > do > if [[ "${COMP_WORDS[i]}" != -* ]]; then > offset=$i; > break; > fi; > done; > _command_offset $offset >} >_command_offset () >{ > local word_offset=$1 i j; > for ((i=0; i < $word_offset; i++ )) > do > for ((j=0; j <= ${#COMP_LINE}; j++ )) > do > [[ "$COMP_LINE" == "${COMP_WORDS[i]}"* ]] && break; > COMP_LINE=${COMP_LINE:1}; > ((COMP_POINT--)); > done; > COMP_LINE=${COMP_LINE#"${COMP_WORDS[i]}"}; > ((COMP_POINT-=${#COMP_WORDS[i]})); > done; > for ((i=0; i <= COMP_CWORD - $word_offset; i++ )) > do > COMP_WORDS[i]=${COMP_WORDS[i+$word_offset]}; > done; > for ((i; i <= COMP_CWORD; i++ )) > do > unset 'COMP_WORDS[i]'; > done; > ((COMP_CWORD -= $word_offset)); > COMPREPLY=(); > local cur; > _get_comp_words_by_ref cur; > if [[ $COMP_CWORD -eq 0 ]]; then > local IFS=' >'; > compopt -o filenames; > COMPREPLY=($( compgen -d -c -- "$cur" )); > else > local cmd=${COMP_WORDS[0]} compcmd=${COMP_WORDS[0]}; > local cspec=$( complete -p $cmd 2>/dev/null ); > if [[ ! -n $cspec && $cmd == */* ]]; then > cspec=$( complete -p ${cmd##*/} 2>/dev/null ); > [[ -n $cspec ]] && compcmd=${cmd##*/}; > fi; > if [[ ! -n $cspec ]]; then > compcmd=${cmd##*/}; > _completion_loader $compcmd; > cspec=$( complete -p $compcmd 2>/dev/null ); > fi; > if [[ -n $cspec ]]; then > if [[ ${cspec#* -F } != $cspec ]]; then > local func=${cspec#*-F }; > func=${func%% *}; > if [[ ${#COMP_WORDS[@]} -ge 2 ]]; then > $func $cmd "${COMP_WORDS[${#COMP_WORDS[@]}-1]}" "${COMP_WORDS[${#COMP_WORDS[@]}-2]}"; > else > $func $cmd "${COMP_WORDS[${#COMP_WORDS[@]}-1]}"; > fi; > local opt; > while [[ $cspec == *" -o "* ]]; do > cspec=${cspec#*-o }; > opt=${cspec%% *}; > compopt -o $opt; > cspec=${cspec#$opt}; > done; > else > cspec=${cspec#complete}; > cspec=${cspec%%$compcmd}; > COMPREPLY=($( eval compgen "$cspec" -- '$cur' )); > fi; > else > if [[ ${#COMPREPLY[@]} -eq 0 ]]; then > _minimal; > fi; > fi; > fi >} >_comp_iprconfig () >{ > iprconfig="${COMP_WORDS[0]}"; > cur="${COMP_WORDS[COMP_CWORD]}"; > prev="${COMP_WORDS[COMP_CWORD-1]}"; > case "${prev}" in > "-c") > opts=$(${iprconfig} -l 2>/dev/null); > COMPREPLY=($(compgen -W "${opts}" -- ${cur})) > ;; > "-k") > COMPREPLY=($(compgen -o dirnames -- ${cur})) > ;; > *) > opts=$(find /dev -printf "%f\n" | grep -G "^\(sd\|sg\)"); > COMPREPLY=($(compgen -W "${opts}" -- ${cur})) > ;; > esac; > return 0 >} >_complete_as_root () >{ > [[ $EUID -eq 0 || -n ${root_command:-} ]] >} >_completion_loader () >{ > local cmd="${1:-_EmptycmD_}"; > __load_completion "$cmd" && return 124; > complete -F _minimal -- "$cmd" && return 124 >} >_configured_interfaces () >{ > if [[ -f /etc/debian_version ]]; then > COMPREPLY=($( compgen -W "$( command sed -ne 's|^iface \([^ ]\{1,\}\).*$|\1|p' /etc/network/interfaces /etc/network/interfaces.d/* 2>/dev/null )" -- "$cur" )); > else > if [[ -f /etc/SuSE-release ]]; then > COMPREPLY=($( compgen -W "$( printf '%s\n' /etc/sysconfig/network/ifcfg-* | command sed -ne 's|.*ifcfg-\([^*].*\)$|\1|p' )" -- "$cur" )); > else > if [[ -f /etc/pld-release ]]; then > COMPREPLY=($( compgen -W "$( command ls -B /etc/sysconfig/interfaces | command sed -ne 's|.*ifcfg-\([^*].*\)$|\1|p' )" -- "$cur" )); > else > COMPREPLY=($( compgen -W "$( printf '%s\n' /etc/sysconfig/network-scripts/ifcfg-* | command sed -ne 's|.*ifcfg-\([^*].*\)$|\1|p' )" -- "$cur" )); > fi; > fi; > fi >} >_count_args () >{ > local i cword words; > __reassemble_comp_words_by_ref "$1" words cword; > args=1; > for i in "${words[@]:1:cword-1}"; > do > [[ "$i" != -* ]] && args=$(($args+1)); > done >} >_dvd_devices () >{ > COMPREPLY+=($( compgen -f -d -X "!*/?(r)dvd*" -- "${cur:-/dev/}" )) >} >_expand () >{ > if [[ "$cur" == \~*/* ]]; then > eval cur=$cur 2> /dev/null; > else > if [[ "$cur" == \~* ]]; then > cur=${cur#\~}; > COMPREPLY=($( compgen -P '~' -u -- "$cur" )); > [[ ${#COMPREPLY[@]} -eq 1 ]] && eval COMPREPLY[0]=${COMPREPLY[0]}; > return ${#COMPREPLY[@]}; > fi; > fi >} >_filedir () >{ > local IFS=' >'; > _tilde "$cur" || return; > local -a toks; > local x tmp; > x=$( compgen -d -- "$cur" ) && while read -r tmp; do > toks+=("$tmp"); > done <<< "$x"; > if [[ "$1" != -d ]]; then > local quoted; > _quote_readline_by_ref "$cur" quoted; > local xspec=${1:+"!*.@($1|${1^^})"}; > x=$( compgen -f -X "$xspec" -- $quoted ) && while read -r tmp; do > toks+=("$tmp"); > done <<< "$x"; > [[ -n ${COMP_FILEDIR_FALLBACK:-} && -n "$1" && ${#toks[@]} -lt 1 ]] && x=$( compgen -f -- $quoted ) && while read -r tmp; do > toks+=("$tmp"); > done <<< "$x"; > fi; > if [[ ${#toks[@]} -ne 0 ]]; then > compopt -o filenames 2> /dev/null; > COMPREPLY+=("${toks[@]}"); > fi >} >_filedir_xspec () >{ > local cur prev words cword; > _init_completion || return; > _tilde "$cur" || return; > local IFS=' >' xspec=${_xspecs[${1##*/}]} tmp; > local -a toks; > toks=($( > compgen -d -- "$(quote_readline "$cur")" | { > while read -r tmp; do > printf '%s\n' $tmp > done > } > )); > eval xspec="${xspec}"; > local matchop=!; > if [[ $xspec == !* ]]; then > xspec=${xspec#!}; > matchop=@; > fi; > xspec="$matchop($xspec|${xspec^^})"; > toks+=($( > eval compgen -f -X "'!$xspec'" -- "\$(quote_readline "\$cur")" | { > while read -r tmp; do > [[ -n $tmp ]] && printf '%s\n' $tmp > done > } > )); > if [[ ${#toks[@]} -ne 0 ]]; then > compopt -o filenames; > COMPREPLY=("${toks[@]}"); > fi >} >_fstypes () >{ > local fss; > if [[ -e /proc/filesystems ]]; then > fss="$( cut -d' ' -f2 /proc/filesystems ) > $( awk '! /\*/ { print $NF }' /etc/filesystems 2>/dev/null )"; > else > fss="$( awk '/^[ \t]*[^#]/ { print $3 }' /etc/fstab 2>/dev/null ) > $( awk '/^[ \t]*[^#]/ { print $3 }' /etc/mnttab 2>/dev/null ) > $( awk '/^[ \t]*[^#]/ { print $4 }' /etc/vfstab 2>/dev/null ) > $( awk '{ print $1 }' /etc/dfs/fstypes 2>/dev/null ) > $( [[ -d /etc/fs ]] && command ls /etc/fs )"; > fi; > [[ -n $fss ]] && COMPREPLY+=($( compgen -W "$fss" -- "$cur" )) >} >_generic_function () >{ > local cur prev words cword options; > _init_completion || return; > case "${prev}" in > -f | --confFile) > _filedir yml; > return > ;; > --logfile) > _filedir; > return > ;; > esac; > COMPREPLY=($( compgen -W '$( _parse_vdo_options vdo $1 )' -- "$cur" )); > case "${prev}" in > -n | --name) > if [[ "$1" == "create" ]]; then > return; > else > _vdo_names; > fi > ;; > --writePolicy) > COMPREPLY=($( compgen -W 'sync async auto' -- "$cur" )) > ;; > --activate | --compression | --deduplication | --emulate512 | --sparseIndex) > COMPREPLY=($( compgen -W 'disabled enabled' -- "$cur" )) > ;; > --vdoLogLevel) > COMPREPLY=($( compgen -W 'critical error warning notice info debug' -- "$cur" )) > ;; > --device) > _vdo_devdir > ;; > esac; > return >} >_get_comp_words_by_ref () >{ > local exclude flag i OPTIND=1; > local cur cword words=(); > local upargs=() upvars=() vcur vcword vprev vwords; > while getopts "c:i:n:p:w:" flag "$@"; do > case $flag in > c) > vcur=$OPTARG > ;; > i) > vcword=$OPTARG > ;; > n) > exclude=$OPTARG > ;; > p) > vprev=$OPTARG > ;; > w) > vwords=$OPTARG > ;; > esac; > done; > while [[ $# -ge $OPTIND ]]; do > case ${!OPTIND} in > cur) > vcur=cur > ;; > prev) > vprev=prev > ;; > cword) > vcword=cword > ;; > words) > vwords=words > ;; > *) > echo "bash: $FUNCNAME(): \`${!OPTIND}': unknown argument" 1>&2; > return 1 > ;; > esac; > let "OPTIND += 1"; > done; > __get_cword_at_cursor_by_ref "$exclude" words cword cur; > [[ -n $vcur ]] && { > upvars+=("$vcur"); > upargs+=(-v $vcur "$cur") > }; > [[ -n $vcword ]] && { > upvars+=("$vcword"); > upargs+=(-v $vcword "$cword") > }; > [[ -n $vprev && $cword -ge 1 ]] && { > upvars+=("$vprev"); > upargs+=(-v $vprev "${words[cword - 1]}") > }; > [[ -n $vwords ]] && { > upvars+=("$vwords"); > upargs+=(-a${#words[@]} $vwords "${words[@]}") > }; > (( ${#upvars[@]} )) && local "${upvars[@]}" && _upvars "${upargs[@]}" >} >_get_cword () >{ > local LC_CTYPE=C; > local cword words; > __reassemble_comp_words_by_ref "$1" words cword; > if [[ -n ${2//[^0-9]/} ]]; then > printf "%s" "${words[cword-$2]}"; > else > if [[ "${#words[cword]}" -eq 0 || "$COMP_POINT" == "${#COMP_LINE}" ]]; then > printf "%s" "${words[cword]}"; > else > local i; > local cur="$COMP_LINE"; > local index="$COMP_POINT"; > for ((i = 0; i <= cword; ++i )) > do > while [[ "${#cur}" -ge ${#words[i]} && "${cur:0:${#words[i]}}" != "${words[i]}" ]]; do > cur="${cur:1}"; > [[ $index -gt 0 ]] && ((index--)); > done; > if [[ "$i" -lt "$cword" ]]; then > local old_size="${#cur}"; > cur="${cur#${words[i]}}"; > local new_size="${#cur}"; > index=$(( index - old_size + new_size )); > fi; > done; > if [[ "${words[cword]:0:${#cur}}" != "$cur" ]]; then > printf "%s" "${words[cword]}"; > else > printf "%s" "${cur:0:$index}"; > fi; > fi; > fi >} >_get_first_arg () >{ > local i; > arg=; > for ((i=1; i < COMP_CWORD; i++ )) > do > if [[ "${COMP_WORDS[i]}" != -* ]]; then > arg=${COMP_WORDS[i]}; > break; > fi; > done >} >_get_pword () >{ > if [[ $COMP_CWORD -ge 1 ]]; then > _get_cword "${@:-}" 1; > fi >} >_gids () >{ > if type getent &> /dev/null; then > COMPREPLY=($( compgen -W '$( getent group | cut -d: -f3 )' -- "$cur" )); > else > if type perl &> /dev/null; then > COMPREPLY=($( compgen -W '$( perl -e '"'"'while (($gid) = (getgrent)[2]) { print $gid . "\n" }'"'"' )' -- "$cur" )); > else > COMPREPLY=($( compgen -W '$( cut -d: -f3 /etc/group )' -- "$cur" )); > fi; > fi >} >_gluster_completion () >{ > GLUSTER_FINAL_LIST=`echo $GLUSTER_COMMAND_TREE | egrep -ao --color=never "([A-Za-z0-9_.-]+)|[[:space:]]+|." | egrep -v --color=never "^[[:space:]]*$" | _gluster_parse`; > ARG="GLUSTER_FINAL_LIST"; > _gluster_handle_list $ARG ${COMP_WORDS[COMP_CWORD]}; > return >} >_gluster_does_match () >{ > local token="$1"; > local key="$2"; > if [ "${token:0:1}" == "_" ]; then > $token $2; > return $?; > fi; > [ "$token" == "$key" ] && return 0; > return 1 >} >_gluster_form_list () >{ > local token=''; > local top=0; > local comma=''; > local cur_word="$1"; > read -r token; > case $token in > ']') > > ;; > '{') > _gluster_push; > top=$?; > read -r key; > if [ "X$cur_word" == "X" -o "${cur_word:0:1}" == "${key:0:1}" -o "${key:0:1}" == "_" ]; then > GLUSTER_LIST="$GLUSTER_LIST $key"; > fi; > _gluster_goto_end $top; > read -r comma; > if [ "$comma" == "," ]; then > _gluster_form_list $cur_word; > fi > ;; > *) > _gluster_throw "Expected '{' but received $token" > ;; > esac; > return >} >_gluster_goto_child () >{ > local match_string="$1"; > local token=''; > local top=0; > local comma=''; > read -r token; > case $token in > '{') > _gluster_push; > top=$? > ;; > *) > _gluster_throw "Expected '{' but received $token" > ;; > esac; > read -r token; > case `echo $token` in > '[' | ']' | '{' | '}') > _gluster_throw "Expected string but received $token" > ;; > _*) > $token "match" $match_string; > ret=$?; > if [ $ret -eq 0 ]; then > return; > else > _gluster_goto_end $top; > read -r comma; > if [ "$comma" == "," ]; then > _gluster_goto_child $match_string; > fi; > fi > ;; > "$match_string") > return > ;; > *) > _gluster_goto_end $top; > read -r comma; > if [ "$comma" == "," ]; then > _gluster_goto_child $match_string; > fi > ;; > esac; > return >} >_gluster_goto_end () >{ > local prev_top=$1; > local top=$1; > local token=''; > while [ $top -ge $prev_top ]; do > read -r token; > case $token in > '{' | '[') > _gluster_push; > top=$? > ;; > '}' | ']') > _gluster_pop; > top=$? > ;; > esac; > done; > return >} >_gluster_handle_list () >{ > local list="${!1}"; > local cur_word=$2; > local count=0; > local i=0; > for i in `echo $list`; > do > count=$((count + 1)); > done; > if [ $count -eq 1 ] && [ "${i:0:1}" == "_" ]; then > $i "complete" $cur_word; > else > COMPREPLY=($(compgen -W "$list" -- $cur_word)); > fi; > return >} >_gluster_parse () >{ > local i=0; > local token=''; > local tmp_token=''; > local word=''; > while [ $i -lt $COMP_CWORD ]; do > read -r token; > case $token in > '[') > _gluster_push; > _gluster_goto_child ${COMP_WORDS[$i]} > ;; > '{') > _gluster_push; > read -r tmp_token; > _gluster_does_match $tmp_token ${COMP_WORDS[$i]}; > if [ $? -ne 0 ]; then > _gluster_throw "No match"; > fi > ;; > esac; > i=$((i+1)); > done; > read -r token; > if [ "$token" == '[' ]; then > _gluster_push; > _gluster_form_list ${COMP_WORDS[COMP_CWORD]}; > else > if [ "$token" == '{' ]; then > read -r tmp_token; > GLUSTER_LIST="$tmp_token"; > fi; > fi; > echo $GLUSTER_LIST >} >_gluster_pop () >{ > GLUSTER_TOP=$((GLUSTER_TOP - 1)); > return $GLUSTER_TOP >} >_gluster_push () >{ > GLUSTER_TOP=$((GLUSTER_TOP + 1)); > return $GLUSTER_TOP >} >_gluster_throw () >{ > COMPREPLY=''; > exit >} >_have () >{ > PATH=$PATH:/usr/sbin:/sbin:/usr/local/sbin type $1 &> /dev/null >} >_included_ssh_config_files () >{ > [[ $# -lt 1 ]] && echo "error: $FUNCNAME: missing mandatory argument CONFIG"; > local configfile i f; > configfile=$1; > local included=$( command sed -ne 's/^[[:blank:]]*[Ii][Nn][Cc][Ll][Uu][Dd][Ee][[:blank:]]\{1,\}\([^#%]*\)\(#.*\)\{0,1\}$/\1/p' "${configfile}" ); > for i in ${included[@]}; > do > if ! [[ "$i" =~ ^\~.*|^\/.* ]]; then > if [[ "$configfile" =~ ^\/etc\/ssh.* ]]; then > i="/etc/ssh/$i"; > else > i="$HOME/.ssh/$i"; > fi; > fi; > __expand_tilde_by_ref i; > for f in ${i}; > do > if [ -r $f ]; then > config+=("$f"); > _included_ssh_config_files $f; > fi; > done; > done >} >_init_completion () >{ > local exclude= flag outx errx inx OPTIND=1; > while getopts "n:e:o:i:s" flag "$@"; do > case $flag in > n) > exclude+=$OPTARG > ;; > e) > errx=$OPTARG > ;; > o) > outx=$OPTARG > ;; > i) > inx=$OPTARG > ;; > s) > split=false; > exclude+== > ;; > esac; > done; > COMPREPLY=(); > local redir="@(?([0-9])<|?([0-9&])>?(>)|>&)"; > _get_comp_words_by_ref -n "$exclude<>&" cur prev words cword; > _variables && return 1; > if [[ $cur == $redir* || $prev == $redir ]]; then > local xspec; > case $cur in > 2'>'*) > xspec=$errx > ;; > *'>'*) > xspec=$outx > ;; > *'<'*) > xspec=$inx > ;; > *) > case $prev in > 2'>'*) > xspec=$errx > ;; > *'>'*) > xspec=$outx > ;; > *'<'*) > xspec=$inx > ;; > esac > ;; > esac; > cur="${cur##$redir}"; > _filedir $xspec; > return 1; > fi; > local i skip; > for ((i=1; i < ${#words[@]}; 1)) > do > if [[ ${words[i]} == $redir* ]]; then > [[ ${words[i]} == $redir ]] && skip=2 || skip=1; > words=("${words[@]:0:i}" "${words[@]:i+skip}"); > [[ $i -le $cword ]] && cword=$(( cword - skip )); > else > i=$(( ++i )); > fi; > done; > [[ $cword -le 0 ]] && return 1; > prev=${words[cword-1]}; > [[ -n ${split-} ]] && _split_longopt && split=true; > return 0 >} >_installed_modules () >{ > COMPREPLY=($( compgen -W "$( PATH="$PATH:/sbin" lsmod | awk '{if (NR != 1) print $1}' )" -- "$1" )) >} >_ip_addresses () >{ > local PATH=$PATH:/sbin; > COMPREPLY+=($( compgen -W "$( { LC_ALL=C ifconfig -a || ip addr show; } 2>/dev/null | command sed -ne 's/.*addr:\([^[:space:]]*\).*/\1/p' -ne 's|.*inet[[:space:]]\{1,\}\([^[:space:]/]*\).*|\1|p' )" -- "$cur" )) >} >_kernel_versions () >{ > COMPREPLY=($( compgen -W '$( command ls /lib/modules )' -- "$cur" )) >} >_known_hosts () >{ > local cur prev words cword; > _init_completion -n : || return; > local options; > [[ "$1" == -a || "$2" == -a ]] && options=-a; > [[ "$1" == -c || "$2" == -c ]] && options+=" -c"; > _known_hosts_real $options -- "$cur" >} >_known_hosts_real () >{ > local configfile flag prefix; > local cur curd awkcur user suffix aliases i host; > local -a kh khd config; > local OPTIND=1; > while getopts "acF:p:" flag "$@"; do > case $flag in > a) > aliases='yes' > ;; > c) > suffix=':' > ;; > F) > configfile=$OPTARG > ;; > p) > prefix=$OPTARG > ;; > esac; > done; > [[ $# -lt $OPTIND ]] && echo "error: $FUNCNAME: missing mandatory argument CWORD"; > cur=${!OPTIND}; > let "OPTIND += 1"; > [[ $# -ge $OPTIND ]] && echo "error: $FUNCNAME("$@"): unprocessed arguments:" $(while [[ $# -ge $OPTIND ]]; do printf '%s\n' ${!OPTIND}; shift; done); > [[ $cur == *@* ]] && user=${cur%@*}@ && cur=${cur#*@}; > kh=(); > if [[ -n $configfile ]]; then > [[ -r $configfile ]] && config+=("$configfile"); > else > for i in /etc/ssh/ssh_config ~/.ssh/config ~/.ssh2/config; > do > [[ -r $i ]] && config+=("$i"); > done; > fi; > for i in "${config[@]}"; > do > _included_ssh_config_files "$i"; > done; > if [[ ${#config[@]} -gt 0 ]]; then > local OIFS=$IFS IFS=' >' j; > local -a tmpkh; > tmpkh=($( awk 'sub("^[ \t]*([Gg][Ll][Oo][Bb][Aa][Ll]|[Uu][Ss][Ee][Rr])[Kk][Nn][Oo][Ww][Nn][Hh][Oo][Ss][Tt][Ss][Ff][Ii][Ll][Ee][ \t]+", "") { print $0 }' "${config[@]}" | sort -u )); > IFS=$OIFS; > for i in "${tmpkh[@]}"; > do > while [[ $i =~ ^([^\"]*)\"([^\"]*)\"(.*)$ ]]; do > i=${BASH_REMATCH[1]}${BASH_REMATCH[3]}; > j=${BASH_REMATCH[2]}; > __expand_tilde_by_ref j; > [[ -r $j ]] && kh+=("$j"); > done; > for j in $i; > do > __expand_tilde_by_ref j; > [[ -r $j ]] && kh+=("$j"); > done; > done; > fi; > if [[ -z $configfile ]]; then > for i in /etc/ssh/ssh_known_hosts /etc/ssh/ssh_known_hosts2 /etc/known_hosts /etc/known_hosts2 ~/.ssh/known_hosts ~/.ssh/known_hosts2; > do > [[ -r $i ]] && kh+=("$i"); > done; > for i in /etc/ssh2/knownhosts ~/.ssh2/hostkeys; > do > [[ -d $i ]] && khd+=("$i"/*pub); > done; > fi; > if [[ ${#kh[@]} -gt 0 || ${#khd[@]} -gt 0 ]]; then > awkcur=${cur//\//\\\/}; > awkcur=${awkcur//\./\\\.}; > curd=$awkcur; > if [[ "$awkcur" == [0-9]*[.:]* ]]; then > awkcur="^$awkcur[.:]*"; > else > if [[ "$awkcur" == [0-9]* ]]; then > awkcur="^$awkcur.*[.:]"; > else > if [[ -z $awkcur ]]; then > awkcur="[a-z.:]"; > else > awkcur="^$awkcur"; > fi; > fi; > fi; > if [[ ${#kh[@]} -gt 0 ]]; then > COMPREPLY+=($( awk 'BEGIN {FS=","} > /^\s*[^|\#]/ { > sub("^@[^ ]+ +", ""); \ > sub(" .*$", ""); \ > for (i=1; i<=NF; ++i) { \ > sub("^\\[", "", $i); sub("\\](:[0-9]+)?$", "", $i); \ > if ($i !~ /[*?]/ && $i ~ /'"$awkcur"'/) {print $i} \ > }}' "${kh[@]}" 2>/dev/null )); > fi; > if [[ ${#khd[@]} -gt 0 ]]; then > for i in "${khd[@]}"; > do > if [[ "$i" == *key_22_$curd*.pub && -r "$i" ]]; then > host=${i/#*key_22_/}; > host=${host/%.pub/}; > COMPREPLY+=($host); > fi; > done; > fi; > for ((i=0; i < ${#COMPREPLY[@]}; i++ )) > do > COMPREPLY[i]=$prefix$user${COMPREPLY[i]}$suffix; > done; > fi; > if [[ ${#config[@]} -gt 0 && -n "$aliases" ]]; then > local hosts=$( command sed -ne 's/^[[:blank:]]*[Hh][Oo][Ss][Tt][[:blank:]]\{1,\}\([^#*?%]*\)\(#.*\)\{0,1\}$/\1/p' "${config[@]}" ); > COMPREPLY+=($( compgen -P "$prefix$user" -S "$suffix" -W "$hosts" -- "$cur" )); > fi; > if [[ -n ${COMP_KNOWN_HOSTS_WITH_AVAHI:-} ]] && type avahi-browse &> /dev/null; then > COMPREPLY+=($( compgen -P "$prefix$user" -S "$suffix" -W "$( avahi-browse -cpr _workstation._tcp 2>/dev/null | awk -F';' '/^=/ { print $7 }' | sort -u )" -- "$cur" )); > fi; > COMPREPLY+=($( compgen -W "$( ruptime 2>/dev/null | awk '!/^ruptime:/ { print $1 }' )" -- "$cur" )); > if [[ -n ${COMP_KNOWN_HOSTS_WITH_HOSTFILE-1} ]]; then > COMPREPLY+=($( compgen -A hostname -P "$prefix$user" -S "$suffix" -- "$cur" )); > fi; > __ltrim_colon_completions "$prefix$user$cur" >} >_longopt () >{ > local cur prev words cword split; > _init_completion -s || return; > case "${prev,,}" in > --help | --usage | --version) > return > ;; > --*dir*) > _filedir -d; > return > ;; > --*file* | --*path*) > _filedir; > return > ;; > --+([-a-z0-9_])) > local argtype=$( LC_ALL=C $1 --help 2>&1 | command sed -ne "s|.*$prev\[\{0,1\}=[<[]\{0,1\}\([-A-Za-z0-9_]\{1,\}\).*|\1|p" ); > case ${argtype,,} in > *dir*) > _filedir -d; > return > ;; > *file* | *path*) > _filedir; > return > ;; > esac > ;; > esac; > $split && return; > if [[ "$cur" == -* ]]; then > COMPREPLY=($( compgen -W "$( LC_ALL=C $1 --help 2>&1 | command sed -ne 's/.*\(--[-A-Za-z0-9]\{1,\}=\{0,1\}\).*/\1/p' | sort -u )" -- "$cur" )); > [[ $COMPREPLY == *= ]] && compopt -o nospace; > else > if [[ "$1" == @(@(mk|rm)dir|chroot) ]]; then > _filedir -d; > else > _filedir; > fi; > fi >} >_mac_addresses () >{ > local re='\([A-Fa-f0-9]\{2\}:\)\{5\}[A-Fa-f0-9]\{2\}'; > local PATH="$PATH:/sbin:/usr/sbin"; > COMPREPLY+=($( { LC_ALL=C ifconfig -a || ip link show; } 2>/dev/null | command sed -ne "s/.*[[:space:]]HWaddr[[:space:]]\{1,\}\($re\)[[:space:]].*/\1/p" -ne "s/.*[[:space:]]HWaddr[[:space:]]\{1,\}\($re\)[[:space:]]*$/\1/p" -ne "s|.*[[:space:]]\(link/\)\{0,1\}ether[[:space:]]\{1,\}\($re\)[[:space:]].*|\2|p" -ne "s|.*[[:space:]]\(link/\)\{0,1\}ether[[:space:]]\{1,\}\($re\)[[:space:]]*$|\2|p" > )); > COMPREPLY+=($( { arp -an || ip neigh show; } 2>/dev/null | command sed -ne "s/.*[[:space:]]\($re\)[[:space:]].*/\1/p" -ne "s/.*[[:space:]]\($re\)[[:space:]]*$/\1/p" )); > COMPREPLY+=($( command sed -ne "s/^[[:space:]]*\($re\)[[:space:]].*/\1/p" /etc/ethers 2>/dev/null )); > COMPREPLY=($( compgen -W '${COMPREPLY[@]}' -- "$cur" )); > __ltrim_colon_completions "$cur" >} >_minimal () >{ > local cur prev words cword split; > _init_completion -s || return; > $split && return; > _filedir >} >_modules () >{ > local modpath; > modpath=/lib/modules/$1; > COMPREPLY=($( compgen -W "$( command ls -RL $modpath 2>/dev/null | command sed -ne 's/^\(.*\)\.k\{0,1\}o\(\.[gx]z\)\{0,1\}$/\1/p' )" -- "$cur" )) >} >_ncpus () >{ > local var=NPROCESSORS_ONLN; > [[ $OSTYPE == *linux* ]] && var=_$var; > local n=$( getconf $var 2>/dev/null ); > printf %s ${n:-1} >} >_parse_help () >{ > eval local cmd=$( quote "$1" ); > local line; > { > case $cmd in > -) > cat > ;; > *) > LC_ALL=C "$( dequote "$cmd" )" ${2:---help} 2>&1 > ;; > esac > } | while read -r line; do > [[ $line == *([[:blank:]])-* ]] || continue; > while [[ $line =~ ((^|[^-])-[A-Za-z0-9?][[:space:]]+)\[?[A-Z0-9]+\]? ]]; do > line=${line/"${BASH_REMATCH[0]}"/"${BASH_REMATCH[1]}"}; > done; > __parse_options "${line// or /, }"; > done >} >_parse_usage () >{ > eval local cmd=$( quote "$1" ); > local line match option i char; > { > case $cmd in > -) > cat > ;; > *) > LC_ALL=C "$( dequote "$cmd" )" ${2:---usage} 2>&1 > ;; > esac > } | while read -r line; do > while [[ $line =~ \[[[:space:]]*(-[^]]+)[[:space:]]*\] ]]; do > match=${BASH_REMATCH[0]}; > option=${BASH_REMATCH[1]}; > case $option in > -?(\[)+([a-zA-Z0-9?])) > for ((i=1; i < ${#option}; i++ )) > do > char=${option:i:1}; > [[ $char != '[' ]] && printf '%s\n' -$char; > done > ;; > *) > __parse_options "$option" > ;; > esac; > line=${line#*"$match"}; > done; > done >} >_parse_vdo_options () >{ > eval local cmd=$( quote "$1" ); > local line; > { > case $cmd in > -) > cat > ;; > *) > LC_ALL=C "$( dequote "$cmd" )" $2 --help 2>&1 > ;; > esac > } | while read -r line; do > [[ $line == *([[:blank:]])-* ]] || continue; > while [[ $line =~ ((^|[^-])-[A-Za-z0-9?][[:space:]]+)\[?[A-Z0-9]+\]? ]]; do > line=${line/"${BASH_REMATCH[0]}"/"${BASH_REMATCH[1]}"}; > done; > __parse_vdo_options "${line// or /, }"; > done >} >_pci_ids () >{ > COMPREPLY+=($( compgen -W "$( PATH="$PATH:/sbin" lspci -n | awk '{print $3}')" -- "$cur" )) >} >_pgids () >{ > COMPREPLY=($( compgen -W '$( command ps axo pgid= )' -- "$cur" )) >} >_pids () >{ > COMPREPLY=($( compgen -W '$( command ps axo pid= )' -- "$cur" )) >} >_pnames () >{ > if [[ "$1" == -s ]]; then > COMPREPLY=($( compgen -X '<defunct>' -W '$( command ps axo comm | command sed -e 1d )' -- "$cur" )); > else > COMPREPLY=($( compgen -X '<defunct>' -W '$( command ps axo command= | command sed -e \ > "s/ .*//" -e \ > "s:.*/::" -e \ > "s/:$//" -e \ > "s/^[[(-]//" -e \ > "s/[])]$//" | sort -u )' -- "$cur" )); > fi >} >_quote_readline_by_ref () >{ > if [[ $1 == \'* ]]; then > printf -v $2 %s "${1:1}"; > else > printf -v $2 %q "$1"; > fi; > [[ ${!2} == \$* ]] && eval $2=${!2} >} >_realcommand () >{ > type -P "$1" > /dev/null && { > if type -p realpath > /dev/null; then > realpath "$(type -P "$1")"; > else > if type -p greadlink > /dev/null; then > greadlink -f "$(type -P "$1")"; > else > if type -p readlink > /dev/null; then > readlink -f "$(type -P "$1")"; > else > type -P "$1"; > fi; > fi; > fi > } >} >_rl_enabled () >{ > [[ "$( bind -v )" == *$1+([[:space:]])on* ]] >} >_root_command () >{ > local PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin; > local root_command=$1; > _command >} >_service () >{ > local cur prev words cword; > _init_completion || return; > [[ $cword -gt 2 ]] && return; > if [[ $cword -eq 1 && $prev == ?(*/)service ]]; then > _services; > [[ -e /etc/mandrake-release ]] && _xinetd_services; > else > local sysvdirs; > _sysvdirs; > COMPREPLY=($( compgen -W '`command sed -e "y/|/ /" \ > -ne "s/^.*\(U\|msg_u\)sage.*{\(.*\)}.*$/\2/p" \ > ${sysvdirs[0]}/${prev##*/} 2>/dev/null` start stop' -- "$cur" )); > fi >} >_services () >{ > local sysvdirs; > _sysvdirs; > local restore_nullglob=$(shopt -p nullglob); > shopt -s nullglob; > COMPREPLY=($( printf '%s\n' ${sysvdirs[0]}/!($_backup_glob|functions|README) )); > $restore_nullglob; > COMPREPLY+=($( systemctl list-units --full --all 2>/dev/null | awk '$1 ~ /\.service$/ { sub("\\.service$", "", $1); print $1 }' )); > if [[ -x /sbin/upstart-udev-bridge ]]; then > COMPREPLY+=($( initctl list 2>/dev/null | cut -d' ' -f1 )); > fi; > COMPREPLY=($( compgen -W '${COMPREPLY[@]#${sysvdirs[0]}/}' -- "$cur" )) >} >_shells () >{ > local shell rest; > while read -r shell rest; do > [[ $shell == /* && $shell == "$cur"* ]] && COMPREPLY+=($shell); > done 2> /dev/null < /etc/shells >} >_signals () >{ > local -a sigs=($( compgen -P "$1" -A signal "SIG${cur#$1}" )); > COMPREPLY+=("${sigs[@]/#${1}SIG/${1}}") >} >_split_longopt () >{ > if [[ "$cur" == --?*=* ]]; then > prev="${cur%%?(\\)=*}"; > cur="${cur#*=}"; > return 0; > fi; > return 1 >} >_sysfs_get_netdevs () >{ > COMPREPLY+=($( compgen -W "$( ls /sys/class/net 2>/dev/null )" -- "$cur" )) >} >_sysvdirs () >{ > sysvdirs=(); > [[ -d /etc/rc.d/init.d ]] && sysvdirs+=(/etc/rc.d/init.d); > [[ -d /etc/init.d ]] && sysvdirs+=(/etc/init.d); > [[ -f /etc/slackware-version ]] && sysvdirs=(/etc/rc.d) >} >_terms () >{ > COMPREPLY+=($( compgen -W "$( command sed -ne 's/^\([^[:space:]#|]\{2,\}\)|.*/\1/p' /etc/termcap 2>/dev/null )" -- "$cur" )); > COMPREPLY+=($( compgen -W "$( { toe -a 2>/dev/null || toe 2>/dev/null; } | awk '{ print $1 }' | sort -u )" -- "$cur" )) >} >_tilde () >{ > local result=0; > if [[ $1 == \~* && $1 != */* ]]; then > COMPREPLY=($( compgen -P '~' -u -- "${1#\~}" )); > result=${#COMPREPLY[@]}; > [[ $result -gt 0 ]] && compopt -o filenames 2> /dev/null; > fi; > return $result >} >_uids () >{ > if type getent &> /dev/null; then > COMPREPLY=($( compgen -W '$( getent passwd | cut -d: -f3 )' -- "$cur" )); > else > if type perl &> /dev/null; then > COMPREPLY=($( compgen -W '$( perl -e '"'"'while (($uid) = (getpwent)[2]) { print $uid . "\n" }'"'"' )' -- "$cur" )); > else > COMPREPLY=($( compgen -W '$( cut -d: -f3 /etc/passwd )' -- "$cur" )); > fi; > fi >} >_upvar () >{ > if unset -v "$1"; then > if (( $# == 2 )); then > eval $1=\"\$2\"; > else > eval $1=\(\"\${@:2}\"\); > fi; > fi >} >_upvars () >{ > if ! (( $# )); then > echo "${FUNCNAME[0]}: usage: ${FUNCNAME[0]} [-v varname" "value] | [-aN varname [value ...]] ..." 1>&2; > return 2; > fi; > while (( $# )); do > case $1 in > -a*) > [[ -n ${1#-a} ]] || { > echo "bash: ${FUNCNAME[0]}: \`$1': missing" "number specifier" 1>&2; > return 1 > }; > printf %d "${1#-a}" &> /dev/null || { > echo "bash:" "${FUNCNAME[0]}: \`$1': invalid number specifier" 1>&2; > return 1 > }; > [[ -n "$2" ]] && unset -v "$2" && eval $2=\(\"\${@:3:${1#-a}}\"\) && shift $((${1#-a} + 2)) || { > echo "bash: ${FUNCNAME[0]}:" "\`$1${2+ }$2': missing argument(s)" 1>&2; > return 1 > } > ;; > -v) > [[ -n "$2" ]] && unset -v "$2" && eval $2=\"\$3\" && shift 3 || { > echo "bash: ${FUNCNAME[0]}: $1: missing" "argument(s)" 1>&2; > return 1 > } > ;; > *) > echo "bash: ${FUNCNAME[0]}: $1: invalid option" 1>&2; > return 1 > ;; > esac; > done >} >_usb_ids () >{ > COMPREPLY+=($( compgen -W "$( PATH="$PATH:/sbin" lsusb | awk '{print $6}' )" -- "$cur" )) >} >_user_at_host () >{ > local cur prev words cword; > _init_completion -n : || return; > if [[ $cur == *@* ]]; then > _known_hosts_real "$cur"; > else > COMPREPLY=($( compgen -u -S @ -- "$cur" )); > compopt -o nospace; > fi >} >_usergroup () >{ > if [[ $cur == *\\\\* || $cur == *:*:* ]]; then > return; > else > if [[ $cur == *\\:* ]]; then > local prefix; > prefix=${cur%%*([^:])}; > prefix=${prefix//\\}; > local mycur="${cur#*[:]}"; > if [[ $1 == -u ]]; then > _allowed_groups "$mycur"; > else > local IFS=' >'; > COMPREPLY=($( compgen -g -- "$mycur" )); > fi; > COMPREPLY=($( compgen -P "$prefix" -W "${COMPREPLY[@]}" )); > else > if [[ $cur == *:* ]]; then > local mycur="${cur#*:}"; > if [[ $1 == -u ]]; then > _allowed_groups "$mycur"; > else > local IFS=' >'; > COMPREPLY=($( compgen -g -- "$mycur" )); > fi; > else > if [[ $1 == -u ]]; then > _allowed_users "$cur"; > else > local IFS=' >'; > COMPREPLY=($( compgen -u -- "$cur" )); > fi; > fi; > fi; > fi >} >_userland () >{ > local userland=$( uname -s ); > [[ $userland == @(Linux|GNU/*) ]] && userland=GNU; > [[ $userland == $1 ]] >} >_variables () >{ > if [[ $cur =~ ^(\$(\{[!#]?)?)([A-Za-z0-9_]*)$ ]]; then > if [[ $cur == \${* ]]; then > local arrs vars; > vars=($( compgen -A variable -P ${BASH_REMATCH[1]} -S '}' -- ${BASH_REMATCH[3]} )) && arrs=($( compgen -A arrayvar -P ${BASH_REMATCH[1]} -S '[' -- ${BASH_REMATCH[3]} )); > if [[ ${#vars[@]} -eq 1 && -n $arrs ]]; then > compopt -o nospace; > COMPREPLY+=(${arrs[*]}); > else > COMPREPLY+=(${vars[*]}); > fi; > else > COMPREPLY+=($( compgen -A variable -P '$' -- "${BASH_REMATCH[3]}" )); > fi; > return 0; > else > if [[ $cur =~ ^(\$\{[#!]?)([A-Za-z0-9_]*)\[([^]]*)$ ]]; then > local IFS=' >'; > COMPREPLY+=($( compgen -W '$(printf %s\\n "${!'${BASH_REMATCH[2]}'[@]}")' -P "${BASH_REMATCH[1]}${BASH_REMATCH[2]}[" -S ']}' -- "${BASH_REMATCH[3]}" )); > if [[ ${BASH_REMATCH[3]} == [@*] ]]; then > COMPREPLY+=("${BASH_REMATCH[1]}${BASH_REMATCH[2]}[${BASH_REMATCH[3]}]}"); > fi; > __ltrim_colon_completions "$cur"; > return 0; > else > if [[ $cur =~ ^\$\{[#!]?[A-Za-z0-9_]*\[.*\]$ ]]; then > COMPREPLY+=("$cur}"); > __ltrim_colon_completions "$cur"; > return 0; > else > case $prev in > TZ) > cur=/usr/share/zoneinfo/$cur; > _filedir; > for i in ${!COMPREPLY[@]}; > do > if [[ ${COMPREPLY[i]} == *.tab ]]; then > unset 'COMPREPLY[i]'; > continue; > else > if [[ -d ${COMPREPLY[i]} ]]; then > COMPREPLY[i]+=/; > compopt -o nospace; > fi; > fi; > COMPREPLY[i]=${COMPREPLY[i]#/usr/share/zoneinfo/}; > done; > return 0 > ;; > esac; > fi; > fi; > fi; > return 1 >} >_vdo () >{ > local cur prev words cword; > _init_completion || return; > if [[ $cword -eq 1 ]]; then > COMPREPLY=($( compgen -W ' > activate changeWritePolicy create deactivate disableCompression > disableDeduplication enableCompression enableDeduplication growLogical > growPhysical list modify printConfigFile remove start status > stop' -- "$cur" )); > else > case "${words[1]}" in > activate | changeWritePolicy | create | deactivate | disableCompression | disableDeduplication | enableCompression | enableDeduplication | growLogical | growPhysical | list | modify | printConfigFile | remove | start | status | stop) > _generic_function ${words[1]} > ;; > esac; > fi >} >_vdo_devdir () >{ > local cur prev words cword options; > _init_completion || return; > COMPREPLY=($( compgen -W "$(lsblk -pnro name)" -- "$cur" )) >} >_vdo_names () >{ > local cur prev words cword options; > _init_completion || return; > if [ ! -f $CONF_FILE ]; then > return; > fi; > names=(); > while IFS= read -r line; do > if [[ $line =~ \!VDOService ]]; then > names+=($(echo $line | cut -d: -f1)); > fi; > done < $CONF_FILE; > COMPREPLY=($( compgen -W " ${names[*]}" -- "$cur")) >} >_vdostats () >{ > local opts cur; > _init_completion || return; > COMPREPLY=(); > opts="--help --all --human-readable --si --verbose --version"; > cur="${COMP_WORDS[COMP_CWORD]}"; > case "${cur}" in > *) > COMPREPLY=($(compgen -W "${opts}" -- ${cur})) > ;; > esac >} >_xfunc () >{ > set -- "$@"; > local srcfile=$1; > shift; > declare -F $1 &> /dev/null || { > __load_completion "$srcfile" > }; > "$@" >} >_xinetd_services () >{ > local xinetddir=/etc/xinetd.d; > if [[ -d $xinetddir ]]; then > local restore_nullglob=$(shopt -p nullglob); > shopt -s nullglob; > local -a svcs=($( printf '%s\n' $xinetddir/!($_backup_glob) )); > $restore_nullglob; > COMPREPLY+=($( compgen -W '${svcs[@]#$xinetddir/}' -- "$cur" )); > fi >} >command_not_found_handle () >{ > local runcnf=1; > local retval=127; > [[ $- == *"i"* ]] || runcnf=0; > [[ ! -S /run/dbus/system_bus_socket ]] && runcnf=0; > [[ ! -x '/usr/libexec/packagekitd' ]] && runcnf=0; > [[ -n ${COMP_CWORD-} ]] && runcnf=0; > [[ ! -x '/usr/libexec/pk-command-not-found' ]] && runcnf=0; > if [ $runcnf -eq 1 ]; then > '/usr/libexec/pk-command-not-found' "$@"; > retval=$?; > else > if [[ -n "${BASH_VERSION-}" ]]; then > printf 'bash: %scommand not found\n' "${1:+$1: }" 1>&2; > fi; > fi; > return $retval >} >dequote () >{ > eval printf %s "$1" 2> /dev/null >} >gawklibpath_append () >{ > [ -z "$AWKLIBPATH" ] && AWKLIBPATH=`gawk 'BEGIN {print ENVIRON["AWKLIBPATH"]}'`; > export AWKLIBPATH="$AWKLIBPATH:$*" >} >gawklibpath_default () >{ > unset AWKLIBPATH; > export AWKLIBPATH=`gawk 'BEGIN {print ENVIRON["AWKLIBPATH"]}'` >} >gawklibpath_prepend () >{ > [ -z "$AWKLIBPATH" ] && AWKLIBPATH=`gawk 'BEGIN {print ENVIRON["AWKLIBPATH"]}'`; > export AWKLIBPATH="$*:$AWKLIBPATH" >} >gawkpath_append () >{ > [ -z "$AWKPATH" ] && AWKPATH=`gawk 'BEGIN {print ENVIRON["AWKPATH"]}'`; > export AWKPATH="$AWKPATH:$*" >} >gawkpath_default () >{ > unset AWKPATH; > export AWKPATH=`gawk 'BEGIN {print ENVIRON["AWKPATH"]}'` >} >gawkpath_prepend () >{ > [ -z "$AWKPATH" ] && AWKPATH=`gawk 'BEGIN {print ENVIRON["AWKPATH"]}'`; > export AWKPATH="$*:$AWKPATH" >} >quote () >{ > local quoted=${1//\'/\'\\\'\'}; > printf "'%s'" "$quoted" >} >quote_readline () >{ > local quoted; > _quote_readline_by_ref "$1" ret; > printf %s "$ret" >} >[root@localhost ~]# >
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 1876397
: 1723065