Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 591647 Details for
Bug 831853
Fresh install of FC17 Environment is polluted and user jetty is in place.
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Look at the bottom for "pollution"
setinfo.txt (text/plain), 237.37 KB, created by
AvatarSmith
on 2012-06-13 22:18:14 UTC
(
hide
)
Description:
Look at the bottom for "pollution"
Filename:
MIME Type:
Creator:
AvatarSmith
Created:
2012-06-13 22:18:14 UTC
Size:
237.37 KB
patch
obsolete
>ALL_OPTS='-l --list -S -o -n --noheading -h --help' >BASH=/usr/bin/bash >BASHOPTS=checkwinsize:cmdhist:expand_aliases:extglob:extquote:force_fignore:interactive_comments:progcomp:promptvars:sourcepath >BASH_ALIASES=() >BASH_ARGC=() >BASH_ARGV=() >BASH_CMDS=() >BASH_COMPLETION_COMPAT_DIR=/etc/bash_completion.d >BASH_LINENO=() >BASH_SOURCE=() >BASH_VERSINFO=([0]="4" [1]="2" [2]="29" [3]="1" [4]="release" [5]="i386-redhat-linux-gnu") >BASH_VERSION='4.2.29(1)-release' >CCACHE_HASHDIR= >COLORS=/etc/DIR_COLORS >COLORTERM=gnome-terminal >COLUMNS=80 >COMP_WORDBREAKS=$' \t\n"\'><=;|&(:' >CVS_RSH=ssh >DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-9stUmsTePk,guid=ec1808925eced3491d16cc0200000256 >DESKTOP_SESSION=gnome >DIRSTACK=() >DISPLAY=:0 >EUID=1000 >GDMSESSION=gnome >GDM_LANG=en_US.utf8 >GNOME_DESKTOP_SESSION_ID=this-is-deprecated >GNOME_KEYRING_CONTROL=/run/user/chucks/keyring-CUIMBf >GPG_AGENT_INFO=/run/user/chucks/keyring-CUIMBf/gpg:0:1 >GROUPS=() >HISTCONTROL=ignoredups >HISTFILE=/home/chucks/.bash_history >HISTFILESIZE=1000 >HISTSIZE=1000 >HOME=/home/chucks >HOSTNAME=BlackKnight >HOSTTYPE=i386 >IFS=$' \t\n' >IMSETTINGS_INTEGRATE_DESKTOP=yes >IMSETTINGS_MODULE=none >LANG=en_US.utf8 >LESSOPEN='||/usr/bin/lesspipe.sh %s' >LINES=24 >LOGNAME=chucks >LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.tbz=01;31:*.tbz2=01;31:*.bz=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36:*.pdf=00;33:*.ps=00;33:*.ps.gz=00;33:*.txt=00;33:*.patch=00;33:*.diff=00;33:*.log=00;33:*.tex=00;33:*.xls=00;33:*.xlsx=00;33:*.ppt=00;33:*.pptx=00;33:*.rtf=00;33:*.doc=00;33:*.docx=00;33:*.odt=00;33:*.ods=00;33:*.odp=00;33:*.xml=00;33:*.epub=00;33:*.abw=00;33:*.html=00;33:*.wpd=00;33:' >MACHTYPE=i386-redhat-linux-gnu >MAIL=/var/spool/mail/chucks >MAILCHECK=60 >MANAGED_OPTS='-a --add -m --modify -d --delete -D --deleteall -C --locallist ' >OPTERR=1 >OPTIND=1 >OSTYPE=linux-gnu >PATH=/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/home/chucks/.local/bin:/home/chucks/bin >PIPESTATUS=([0]="127") >PPID=12706 >PROMPT_COMMAND='printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"' >PS1='[\u@\h \W]\$ ' >PS2='> ' >PS4='+ ' >PWD=/home/chucks >QT_GRAPHICSSYSTEM_CHECKED=1 >QT_IM_MODULE=xim >SESSION_MANAGER=local/unix:@/tmp/.ICE-unix/909,unix/unix:/tmp/.ICE-unix/909 >SHELL=/bin/bash >SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor >SHLVL=2 >SSH_AUTH_SOCK=/run/user/chucks/keyring-CUIMBf/ssh >TERM=xterm >UID=1000 >USER=chucks >USERNAME=chucks >WINDOWID=37748742 >WINDOWPATH=1 >XAUTHORITY=/var/run/gdm/auth-for-chucks-M7Q9cH/database >XDG_RUNTIME_DIR=/run/user/chucks >XDG_SEAT=seat0 >XDG_SESSION_ID=2 >XDG_VTNR=1 >XMODIFIERS=@im=none >_=Test >__colormgr_commandlist=$'\n create-device\n create-profile\n delete-device\n delete-profile\n device-add-profile\n device-get-default-profile\n device-get-profile-for-qualifier\n device-inhibit\n device-make-profile-default\n device-set-kind\n device-set-model\n device-set-serial\n device-set-vendor\n find-device\n find-device-by-property\n find-profile\n find-profile-by-filename\n get-devices\n get-devices-by-kind\n get-profiles\n get-sensor-reading\n get-sensors\n get-standard-space\n profile-set-filename\n profile-set-qualifier\n sensor-lock\n sensor-set-options\n ' >__git_all_commands= >__git_diff_common_options=$'--stat --numstat --shortstat --summary\n\t\t\t--patch-with-stat --name-only --name-status --color\n\t\t\t--no-color --color-words --no-renames --check\n\t\t\t--full-index --binary --abbrev --diff-filter=\n\t\t\t--find-copies-harder\n\t\t\t--text --ignore-space-at-eol --ignore-space-change\n\t\t\t--ignore-all-space --exit-code --quiet --ext-diff\n\t\t\t--no-ext-diff\n\t\t\t--no-prefix --src-prefix= --dst-prefix=\n\t\t\t--inter-hunk-context=\n\t\t\t--patience\n\t\t\t--raw\n\t\t\t--dirstat --dirstat= --dirstat-by-file\n\t\t\t--dirstat-by-file= --cumulative\n' >__git_fetch_options=$'\n\t--quiet --verbose --append --upload-pack --force --keep --depth=\n\t--tags --no-tags --all --prune --dry-run\n' >__git_log_common_options=$'\n\t--not --all\n\t--branches --tags --remotes\n\t--first-parent --merges --no-merges\n\t--max-count=\n\t--max-age= --since= --after=\n\t--min-age= --until= --before=\n\t--min-parents= --max-parents=\n\t--no-min-parents --no-max-parents\n' >__git_log_date_formats='relative iso8601 rfc2822 short local default raw' >__git_log_gitk_options=$'\n\t--dense --sparse --full-history\n\t--simplify-merges --simplify-by-decoration\n\t--left-right --notes --no-notes\n' >__git_log_pretty_formats='oneline short medium full fuller email raw format:' >__git_log_shortlog_options=$'\n\t--author= --committer= --grep=\n\t--all-match\n' >__git_merge_options=$'\n\t--no-commit --no-stat --log --no-log --squash --strategy\n\t--commit --stat --no-squash --ff --no-ff --ff-only --edit --no-edit\n' >__git_merge_strategies= >__git_mergetools_common=$'diffuse ecmerge emerge kdiff3 meld opendiff\n\t\t\ttkdiff vimdiff gvimdiff xxdiff araxis p4merge bc3\n' >__git_porcelain_commands= >__git_send_email_confirm_options='always never auto cc compose' >__git_send_email_suppresscc_options='author self cc bodycc sob cccmd body all' >__git_whitespacelist='nowarn warn error error-all fix' >__grub_script_check_program=grub2-script-check >__pkcon_commandlist=$'\n accept-eula\n get-roles\n get-depends\n get-details\n get-distro-upgrades\n get-files\n get-filters\n get-groups\n get-packages\n download\n get-requires\n get-time\n get-transactions\n get-update-detail\n get-updates\n get-categories\n install\n install-local\n refresh\n remove\n repo-disable\n repo-enable\n repo-list\n repo-set-data\n resolve\n search\n update\n upgrade-system\n repair\n ' >_backup_glob='@(#*#|*@(~|.@(bak|orig|rej|swp|dpkg*|rpm@(orig|new|save))))' >_xspecs=([freeamp]="!*.@(mp3|ogg|pls|m3u)" [cdiff]="!*.@(dif?(f)|?(d)patch)?(.@([gx]z|bz2|lzma))" [bibtex]="!*.aux" [rgview]="*.@(o|so|so.!(conf|*/*)|a|[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)" [chromium-browser]="!*.@(?([xX]|[sS])[hH][tT][mM]?([lL]))" [tex]="!*.@(?(la)tex|texi|dtx|ins|ltx|dbj)" [netscape]="!*.@(?([xX]|[sS])[hH][tT][mM]?([lL]))" [acroread]="!*.[pf]df" [makeinfo]="!*.texi*" [kwrite]="*.@(o|so|so.!(conf|*/*)|a|[rs]pm|gif|jp?(e)g|mp3|mp?(e)g|avi|asf|ogg|class)" [gview]="*.@(o|so|so.!(conf|*/*)|a|[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)" [lrunzip]="!*.lrz" [bzcat]="!*.?(t)bz?(2)" [amaya]="!*.@(?([xX]|[sS])[hH][tT][mM]?([lL]))" [pdftex]="!*.@(?(la)tex|texi|dtx|ins|ltx|dbj)" [hbpp]="!*.@([Pp][Rr][Gg]|[Cc][Ll][Pp])" [rpm2cpio]="!*.[rs]pm" [view]="*.@(o|so|so.!(conf|*/*)|a|[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]))" [opera]="!*.@(?([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]|okta|p[st]m|s[3t]m|ult|umx|wav|xm)" [lzgrep]="!*.@(tlz|lzma)" [dillo]="!*.@(?([xX]|[sS])[hH][tT][mM]?([lL]))" [aaxine]="!*@(.@(mp?(e)g|MP?(E)G|wma|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|wmv|mp[234]|MP[234]|m4[pv]|M4[PV]|mkv|MKV|og[gmv]|OG[GMV]|t[ps]|T[PS]|m2t?(s)|M2T?(S)|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" [ggv]="!*.@(@(?(e)ps|?(E)PS|pdf|PDF)?(.gz|.GZ|.bz2|.BZ2|.Z))" [lzmore]="!*.@(tlz|lzma)" [lzless]="!*.@(tlz|lzma)" [kdvi]="!*.@(dvi|DVI)?(.@(gz|Z|bz2))" [poedit]="!*.po" [firefox]="!*.@(?([xX]|[sS])[hH][tT][mM]?([lL]))" [gv]="!*.@(@(?(e)ps|?(E)PS|pdf|PDF)?(.gz|.GZ|.bz2|.BZ2|.Z))" [madplay]="!*.mp3" [lbzcat]="!*.?(t)bz?(2)" [lilypond]="!*.ly" [gtranslator]="!*.po" [jadetex]="!*.@(?(la)tex|texi|dtx|ins|ltx|dbj)" [sxemacs]="*.@(o|so|so.!(conf|*/*)|a|[rs]pm|gif|jp?(e)g|mp3|mp?(e)g|avi|asf|ogg|class)" [epdfview]="!*.pdf" [gpdf]="!*.[pf]df" [kghostview]="!*.@(@(?(e)ps|?(E)PS|pdf|PDF)?(.gz|.GZ|.bz2|.BZ2|.Z))" [pbzcat]="!*.?(t)bz?(2)" [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)" [lzcat]="!*.@(tlz|lzma)" [lbunzip2]="!*.?(t)bz?(2)" [ps2pdf13]="!*.@(?(e)ps|pdf)" [vim]="*.@(o|so|so.!(conf|*/*)|a|[rs]pm|gif|jp?(e)g|mp3|mp?(e)g|avi|asf|ogg|class)" [ps2pdf14]="!*.@(?(e)ps|pdf)" [dvips]="!*.dvi" [lzfgrep]="!*.@(tlz|lzma)" [hbrun]="!*.[Hh][Rr][Bb]" [kbabel]="!*.po" [rview]="*.@(o|so|so.!(conf|*/*)|a|[rs]pm|gif|jp?(e)g|mp3|mp?(e)g|avi|asf|ogg|class)" [kaffeine]="!*@(.@(mp?(e)g|MP?(E)G|wma|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|wmv|mp[234]|MP[234]|m4[pv]|M4[PV]|mkv|MKV|og[gmv]|OG[GMV]|t[ps]|T[PS]|m2t?(s)|M2T?(S)|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|tif?(f)|png|p[bgp]m|bmp|x[bp]m|rle|rgb|pcx|fits|pm|?(e)ps)" [rgvim]="*.@(o|so|so.!(conf|*/*)|a|[rs]pm|gif|jp?(e)g|mp3|mp?(e)g|avi|asf|ogg|class)" [dvitype]="!*.dvi" [oodraw]="!*.@(sxd|std|sda|sdd|?(f)odg|otg)" [elinks]="!*.@(?([xX]|[sS])[hH][tT][mM]?([lL]))" [playmidi]="!*.@(mid?(i)|cmf)" [realplay]="!*.@(rm?(j)|ra?(m)|smi?(l))" [xine]="!*@(.@(mp?(e)g|MP?(E)G|wma|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|wmv|mp[234]|MP[234]|m4[pv]|M4[PV]|mkv|MKV|og[gmv]|OG[GMV]|t[ps]|T[PS]|m2t?(s)|M2T?(S)|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" [gqmpeg]="!*.@(mp3|ogg|pls|m3u)" [lzegrep]="!*.@(tlz|lzma)" [aviplay]="!*.@(avi|asf|wmv)" [latex]="!*.@(?(la)tex|texi|dtx|ins|ltx|dbj)" [rvim]="*.@(o|so|so.!(conf|*/*)|a|[rs]pm|gif|jp?(e)g|mp3|mp?(e)g|avi|asf|ogg|class)" [bunzip2]="!*.?(t)bz?(2)" [ogg123]="!*.@(ogg|m3u|flac|spx)" [ps2pdfwr]="!*.@(?(e)ps|pdf)" [znew]="*.Z" [harbour]="!*.@([Pp][Rr][Gg]|[Cc][Ll][Pp])" [lokalize]="!*.po" [kate]="*.@(o|so|so.!(conf|*/*)|a|[rs]pm|gif|jp?(e)g|mp3|mp?(e)g|avi|asf|ogg|class)" [xemacs]="*.@(o|so|so.!(conf|*/*)|a|[rs]pm|gif|jp?(e)g|mp3|mp?(e)g|avi|asf|ogg|class)" [dragon]="!*@(.@(mp?(e)g|MP?(E)G|wma|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|wmv|mp[234]|MP[234]|m4[pv]|M4[PV]|mkv|MKV|og[gmv]|OG[GMV]|t[ps]|T[PS]|m2t?(s)|M2T?(S)|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)" [unlzma]="!*.@(tlz|lzma)" [pdflatex]="!*.@(?(la)tex|texi|dtx|ins|ltx|dbj)" [vi]="*.@(o|so|so.!(conf|*/*)|a|[rs]pm|gif|jp?(e)g|mp3|mp?(e)g|avi|asf|ogg|class)" [mozilla-firefox]="!*.@(?([xX]|[sS])[hH][tT][mM]?([lL]))" [ooimpress]="!*.@(sxi|sti|pps?(x)|ppt?([mx])|pot?([mx])|?(f)odp|otp)" [gvim]="*.@(o|so|so.!(conf|*/*)|a|[rs]pm|gif|jp?(e)g|mp3|mp?(e)g|avi|asf|ogg|class)" [uncompress]="!*.Z" [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)" [unpigz]="!*.@(Z|[gGd]z|t[ag]z)" [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]="*.@(o|so|so.!(conf|*/*)|a|[rs]pm|gif|jp?(e)g|mp3|mp?(e)g|avi|asf|ogg|class)" [fbxine]="!*@(.@(mp?(e)g|MP?(E)G|wma|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|wmv|mp[234]|MP[234]|m4[pv]|M4[PV]|mkv|MKV|og[gmv]|OG[GMV]|t[ps]|T[PS]|m2t?(s)|M2T?(S)|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)" [lynx]="!*.@(?([xX]|[sS])[hH][tT][mM]?([lL]))" [ps2pdf]="!*.@(?(e)ps|pdf)" [kpdf]="!*.@(?(e)ps|pdf)" [oomath]="!*.@(sxm|smf|mml|odf)" [compress]="*.Z" [iceweasel]="!*.@(?([xX]|[sS])[hH][tT][mM]?([lL]))" [mpg321]="!*.mp3" [mpg123]="!*.mp3" [zcat]="!*.@(Z|[gGd]z|t[ag]z)" [unzip]="!*.@(zip|[ejsw]ar|exe|pk3|wsz|zargo|xpi|sxw|o[tx]t|od[fgpst]|epub|apk)" [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])" [modplug123]="!*.@(669|abc|am[fs]|d[bs]m|dmf|far|it|mdl|m[eo]d|mid?(i)|mt[2m]|okta|p[st]m|s[3t]m|ult|umx|wav|xm)" [dvipdfm]="!*.dvi" [oobase]="!*.odb" [texi2html]="!*.texi*" [zipinfo]="!*.@(zip|[ejsw]ar|exe|pk3|wsz|zargo|xpi|sxw|o[tx]t|od[fgpst]|epub|apk)" [epiphany]="!*.@(?([xX]|[sS])[hH][tT][mM]?([lL]))" [gunzip]="!*.@(Z|[gGd]z|t[ag]z)" [google-chrome]="!*.@(?([xX]|[sS])[hH][tT][mM]?([lL]))" [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)" [galeon]="!*.@(?([xX]|[sS])[hH][tT][mM]?([lL]))" [bzme]="!*.@(zip|z|gz|tgz)" [xfig]="!*.fig" [xzcat]="!*.@(?(t)xz|tlz|lzma)" [lyx]="!*.lyx" [timidity]="!*.@(mid?(i)|rmi|rcp|[gr]36|g18|mod|xm|it|x3m|s[3t]m|kar)" [dviselect]="!*.dvi" [xdvi]="!*.@(dvi|DVI)?(.@(gz|Z|bz2))" ) >colors=/etc/DIR_COLORS >python=/usr/include/python2.7 >python_interpreters='/bin/python /bin/python2.7-config /bin/python2.7 /usr/bin/python /usr/bin/python2.7-config /usr/bin/python2.7 /lib/python2.7 /usr/lib/python2.7 /usr/include/python2.7' >pythons='python python2.7 python2.7-config ' >__colormgrcomp () >{ > local all c s=' >' IFS=' '' '' >'; > local cur="${COMP_WORDS[COMP_CWORD]}"; > if [ $# -gt 2 ]; then > cur="$3"; > fi; > for c in $1; > do > case "$c$4" in > *.) > all="$all$c$4$s" > ;; > *) > all="$all$c$4 $s" > ;; > esac; > done; > IFS=$s; > COMPREPLY=($(compgen -P "$2" -W "$all" -- "$cur")); > return >} >__contains_word () >{ > local word=$1; > shift; > for w in $*; > do > [[ $w = $word ]] && return 0; > done; > return 1 >} >__dbus_send () >{ > local IFS=' >'; > local cur="${COMP_WORDS[COMP_CWORD]}"; > if [[ "$cur" == *=* ]]; then > cur=${cur/*=/}; > fi; > COMPREPLY=($(compgen -W "$(/usr/libexec/dbus-bash-completion-helper dbus-send ${COMP_WORDS[@]:0})" -- $cur)) >} >__dconf () >{ > local choices; > case "${COMP_CWORD}" in > 1) > choices='help >read >list >write >reset > update >lock >unlock >watch >dump >load ' > ;; > 2) > case "${COMP_WORDS[1]}" in > help) > choices='help >read >list >write >reset > update >lock >unlock >watch >dump >load ' > ;; > list | dump | load) > choices="$(dconf _complete / "${COMP_WORDS[2]}")" > ;; > read | list | write | lock | unlock | watch | reset) > choices="$(dconf _complete '' "${COMP_WORDS[2]}")" > ;; > esac > ;; > 3) > case "${COMP_WORDS[1]} ${COMP_WORDS[2]}" in > reset\ -f) > choices="$(dconf _complete '' "${COMP_WORDS[3]}")" > ;; > esac > ;; > esac; > local IFS=' >'; > COMPREPLY=($(compgen -W "${choices}" "${COMP_WORDS[$COMP_CWORD]}")) >} >__expand_tilde_by_ref () >{ > if [[ ${!1} == ~* ]]; then > if [[ ${!1} == */* ]]; then > eval $1="${!1/%\/*}"/'${!1#*/}'; > else > eval $1="${!1}"; > fi; > fi >} >__filter_units_by_property () >{ > local property=$1 value=$2; > shift 2; > local units=("$@"); > local props; > IFS=' >' read -rd '' -a props < <(__systemctl show --property "$property" -- "${units[@]}"); > for ((i=0; $i < ${#units[*]}; i++)) > do > if [[ "${props[i]}" = "$property=$value" ]]; then > printf "%s\n" "${units[i]}"; > fi; > done >} >__gdbus () >{ > local IFS=' >'; > local cur=`_get_cword :`; > local suggestions=$(gdbus complete "${COMP_LINE}" ${COMP_POINT}); > COMPREPLY=($(compgen -W "$suggestions" -- "$cur")); > case "$cur" in > *:*) > case "$COMP_WORDBREAKS" in > *:*) > local colon_word=${cur%${cur##*:}}; > local i=${#COMPREPLY[*]}; > while [ $((--i)) -ge 0 ]; do > COMPREPLY[$i]=${COMPREPLY[$i]#"$colon_word"}; > done > ;; > esac > ;; > esac >} >__get_active_units () >{ > __systemctl list-units | { > while read -r a b; do > printf "%s\n" "$a"; > done > } >} >__get_all_booleans () >{ > getsebool -a | cut -f1 -d' ' >} >__get_all_domains () >{ > seinfo -adomain -x 2> /dev/null | tail -n +2 >} >__get_all_file_types () >{ > seinfo -afile_type -x 2> /dev/null | tail -n +2 >} >__get_all_ftypes () >{ > echo '-- -d -c -b -s -l -p' >} >__get_all_node_types () >{ > seinfo -anode_type -x 2> /dev/null | tail -n +2 >} >__get_all_port_types () >{ > seinfo -aport_type -x 2> /dev/null | tail -n +2 >} >__get_all_roles () >{ > seinfo -t 2> /dev/null | tail -n +3 >} >__get_all_seats () >{ > systemd-loginctl list-seats | { > while read -r a b; do > printf "%s\n" "$a"; > done > } >} >__get_all_sessions () >{ > systemd-loginctl list-sessions | { > while read -r a b; do > printf "%s\n" "$a"; > done > } >} >__get_all_stores () >{ > dir -1 -F /etc/selinux/ | grep '/' | cut -d'/' -f 1 >} >__get_all_types () >{ > seinfo -t 2> /dev/null | tail -n +3 >} >__get_all_units () >{ > __systemctl list-units --all | { > while read -r a b; do > printf "%s\n" "$a"; > done > } >} >__get_all_users () >{ > systemd-loginctl list-users | { > while read -r a b; do > printf "%s\n" "$b"; > done > } >} >__get_boolean_opts () >{ > echo '$ALL_OPTS --on -off -1 -0 -F' >} >__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--)); > 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}" >} >__get_disabled_units () >{ > __systemctl list-unit-files | { > while read -r a b c; do > [[ $b == "disabled" ]] && printf "%s\n" "$a"; > done > } >} >__get_dontaudit_opts () >{ > echo '-S on off' >} >__get_enabled_units () >{ > __systemctl list-unit-files | { > while read -r a b c; do > [[ $b == "enabled" ]] && printf "%s\n" "$a"; > done > } >} >__get_failed_units () >{ > __systemctl list-units | { > while read -r a b c d; do > [[ $c == "failed" ]] && printf "%s\n" "$a"; > done > } >} >__get_fcontext_opts () >{ > echo '$ALL_OPTS $MANAGED_OPTS -t --type -e --equal -f --ftype ' >} >__get_inactive_units () >{ > __systemctl list-units --all | { > while read -r a b c d; do > [[ $c == "inactive" ]] && printf "%s\n" "$a"; > done > } >} >__get_interface_opts () >{ > echo '$ALL_OPTS $MANAGED_OPTS -t --type ' >} >__get_login_opts () >{ > echo '$ALL_OPTS $MANAGED_OPTS -s -r ' >} >__get_masked_units () >{ > __systemctl list-unit-files | { > while read -r a b c; do > [[ $b == "masked" ]] && printf "%s\n" "$a"; > done > } >} >__get_module_opts () >{ > echo '$ALL_OPTS $MANAGED_OPTS --enable --disable ' >} >__get_node_opts () >{ > echo '$ALL_OPTS $MANAGED_OPTS -t --type -M --mask -p --proto' >} >__get_permissive_opts () >{ > echo '$ALL_OPTS -a --add -d --delete' >} >__get_port_opts () >{ > echo '$ALL_OPTS $MANAGED_OPTS -t -type -r --range -p --proto' >} >__get_user_opts () >{ > echo '$ALL_OPTS $MANAGED_OPTS -L -r -R --role ' >} >__git_aliased_command () >{ > local word cmdline=$(git --git-dir="$(__gitdir)" config --get "alias.$1"); > for word in $cmdline; > do > case "$word" in > \!gitk | gitk) > echo "gitk"; > return > ;; > \!*) > : shell command alias > ;; > -*) > : option > ;; > *=*) > : setting env > ;; > git) > : git itself > ;; > *) > echo "$word"; > return > ;; > esac; > done >} >__git_aliases () >{ > local i IFS=' >'; > for i in $(git --git-dir="$(__gitdir)" config --get-regexp "alias\..*" 2>/dev/null); > do > case "$i" in > alias.*) > i="${i#alias.}"; > echo "${i/ */}" > ;; > esac; > done >} >__git_complete_file () >{ > __git_complete_revlist_file >} >__git_complete_remote_or_refspec () >{ > local cur_="$cur" cmd="${words[1]}"; > local i c=2 remote="" pfx="" lhs=1 no_complete_refspec=0; > if [ "$cmd" = "remote" ]; then > ((c++)); > fi; > while [ $c -lt $cword ]; do > i="${words[c]}"; > case "$i" in > --mirror) > [ "$cmd" = "push" ] && no_complete_refspec=1 > ;; > --all) > case "$cmd" in > push) > no_complete_refspec=1 > ;; > fetch) > COMPREPLY=(); > return > ;; > *) > > ;; > esac > ;; > -*) > > ;; > *) > remote="$i"; > break > ;; > esac; > ((c++)); > done; > if [ -z "$remote" ]; then > __gitcomp_nl "$(__git_remotes)"; > return; > fi; > if [ $no_complete_refspec = 1 ]; then > COMPREPLY=(); > return; > fi; > [ "$remote" = "." ] && remote=; > case "$cur_" in > *:*) > case "$COMP_WORDBREAKS" in > *:*) > : great > ;; > *) > pfx="${cur_%%:*}:" > ;; > esac; > cur_="${cur_#*:}"; > lhs=0 > ;; > +*) > pfx="+"; > cur_="${cur_#+}" > ;; > esac; > case "$cmd" in > fetch) > if [ $lhs = 1 ]; then > __gitcomp_nl "$(__git_refs2 "$remote")" "$pfx" "$cur_"; > else > __gitcomp_nl "$(__git_refs)" "$pfx" "$cur_"; > fi > ;; > pull | remote) > if [ $lhs = 1 ]; then > __gitcomp_nl "$(__git_refs "$remote")" "$pfx" "$cur_"; > else > __gitcomp_nl "$(__git_refs)" "$pfx" "$cur_"; > fi > ;; > push) > if [ $lhs = 1 ]; then > __gitcomp_nl "$(__git_refs)" "$pfx" "$cur_"; > else > __gitcomp_nl "$(__git_refs "$remote")" "$pfx" "$cur_"; > fi > ;; > esac >} >__git_complete_revlist () >{ > __git_complete_revlist_file >} >__git_complete_revlist_file () >{ > local pfx ls ref cur_="$cur"; > case "$cur_" in > *..?*:*) > return > ;; > ?*:*) > ref="${cur_%%:*}"; > cur_="${cur_#*:}"; > case "$cur_" in > ?*/*) > pfx="${cur_%/*}"; > cur_="${cur_##*/}"; > ls="$ref:$pfx"; > pfx="$pfx/" > ;; > *) > ls="$ref" > ;; > esac; > case "$COMP_WORDBREAKS" in > *:*) > : great > ;; > *) > pfx="$ref:$pfx" > ;; > esac; > local IFS=' >'; > COMPREPLY=($(compgen -P "$pfx" -W "$(git --git-dir="$(__gitdir)" ls-tree "$ls" | sed '/^100... blob /{ > s,^.* ,, > s,$, , > } > /^120000 blob /{ > s,^.* ,, > s,$, , > } > /^040000 tree /{ > s,^.* ,, > s,$,/, > } > s/^.* //')" -- "$cur_")) > ;; > *...*) > pfx="${cur_%...*}..."; > cur_="${cur_#*...}"; > __gitcomp_nl "$(__git_refs)" "$pfx" "$cur_" > ;; > *..*) > pfx="${cur_%..*}.."; > cur_="${cur_#*..}"; > __gitcomp_nl "$(__git_refs)" "$pfx" "$cur_" > ;; > *) > __gitcomp_nl "$(__git_refs)" > ;; > esac >} >__git_complete_strategy () >{ > __git_compute_merge_strategies; > case "$prev" in > -s | --strategy) > __gitcomp "$__git_merge_strategies"; > return 0 > ;; > esac; > case "$cur" in > --strategy=*) > __gitcomp "$__git_merge_strategies" "" "${cur##--strategy=}"; > return 0 > ;; > esac; > return 1 >} >__git_compute_all_commands () >{ > test -n "$__git_all_commands" || __git_all_commands=$(__git_list_all_commands) >} >__git_compute_merge_strategies () >{ > test -n "$__git_merge_strategies" || __git_merge_strategies=$(__git_list_merge_strategies) >} >__git_compute_porcelain_commands () >{ > __git_compute_all_commands; > test -n "$__git_porcelain_commands" || __git_porcelain_commands=$(__git_list_porcelain_commands) >} >__git_config_get_set_variables () >{ > local prevword word config_file= c=$cword; > while [ $c -gt 1 ]; do > word="${words[c]}"; > case "$word" in > --global | --system | --file=*) > config_file="$word"; > break > ;; > -f | --file) > config_file="$word $prevword"; > break > ;; > esac; > prevword=$word; > c=$((--c)); > done; > git --git-dir="$(__gitdir)" config $config_file --list 2> /dev/null | while read -r line; do > case "$line" in > *.*=*) > echo "${line/=*/}" > ;; > esac; > done >} >__git_find_on_cmdline () >{ > local word subcommand c=1; > while [ $c -lt $cword ]; do > word="${words[c]}"; > for subcommand in $1; > do > if [ "$subcommand" = "$word" ]; then > echo "$subcommand"; > return; > fi; > done; > ((c++)); > done >} >__git_has_doubledash () >{ > local c=1; > while [ $c -lt $cword ]; do > if [ "--" = "${words[c]}" ]; then > return 0; > fi; > ((c++)); > done; > return 1 >} >__git_heads () >{ > local dir="$(__gitdir)"; > if [ -d "$dir" ]; then > git --git-dir="$dir" for-each-ref --format='%(refname:short)' refs/heads; > return; > fi >} >__git_list_all_commands () >{ > local i IFS=" "' >'; > for i in $(git help -a|egrep '^ [a-zA-Z0-9]'); > do > case $i in > *--*) > : helper pattern > ;; > *) > echo $i > ;; > esac; > done >} >__git_list_merge_strategies () >{ > git merge -s help 2>&1 | sed -n -e '/[Aa]vailable strategies are: /,/^$/{ > s/\.$// > s/.*:// > s/^[ ]*// > s/[ ]*$// > p > }' >} >__git_list_porcelain_commands () >{ > local i IFS=" "' >'; > __git_compute_all_commands; > for i in "help" $__git_all_commands; > do > case $i in > *--*) > : helper pattern > ;; > applymbox) > : ask gittus > ;; > applypatch) > : ask gittus > ;; > archimport) > : import > ;; > cat-file) > : plumbing > ;; > check-attr) > : plumbing > ;; > check-ref-format) > : plumbing > ;; > checkout-index) > : plumbing > ;; > commit-tree) > : plumbing > ;; > count-objects) > : infrequent > ;; > cvsexportcommit) > : export > ;; > cvsimport) > : import > ;; > cvsserver) > : daemon > ;; > daemon) > : daemon > ;; > diff-files) > : plumbing > ;; > diff-index) > : plumbing > ;; > diff-tree) > : plumbing > ;; > fast-import) > : import > ;; > fast-export) > : export > ;; > fsck-objects) > : plumbing > ;; > fetch-pack) > : plumbing > ;; > fmt-merge-msg) > : plumbing > ;; > for-each-ref) > : plumbing > ;; > hash-object) > : plumbing > ;; > http-*) > : transport > ;; > index-pack) > : plumbing > ;; > init-db) > : deprecated > ;; > local-fetch) > : plumbing > ;; > lost-found) > : infrequent > ;; > ls-files) > : plumbing > ;; > ls-remote) > : plumbing > ;; > ls-tree) > : plumbing > ;; > mailinfo) > : plumbing > ;; > mailsplit) > : plumbing > ;; > merge-*) > : plumbing > ;; > mktree) > : plumbing > ;; > mktag) > : plumbing > ;; > pack-objects) > : plumbing > ;; > pack-redundant) > : plumbing > ;; > pack-refs) > : plumbing > ;; > parse-remote) > : plumbing > ;; > patch-id) > : plumbing > ;; > peek-remote) > : plumbing > ;; > prune) > : plumbing > ;; > prune-packed) > : plumbing > ;; > quiltimport) > : import > ;; > read-tree) > : plumbing > ;; > receive-pack) > : plumbing > ;; > remote-*) > : transport > ;; > repo-config) > : deprecated > ;; > rerere) > : plumbing > ;; > rev-list) > : plumbing > ;; > rev-parse) > : plumbing > ;; > runstatus) > : plumbing > ;; > sh-setup) > : internal > ;; > shell) > : daemon > ;; > show-ref) > : plumbing > ;; > send-pack) > : plumbing > ;; > show-index) > : plumbing > ;; > ssh-*) > : transport > ;; > stripspace) > : plumbing > ;; > symbolic-ref) > : plumbing > ;; > tar-tree) > : deprecated > ;; > unpack-file) > : plumbing > ;; > unpack-objects) > : plumbing > ;; > update-index) > : plumbing > ;; > update-ref) > : plumbing > ;; > update-server-info) > : daemon > ;; > upload-archive) > : plumbing > ;; > upload-pack) > : plumbing > ;; > write-tree) > : plumbing > ;; > var) > : infrequent > ;; > verify-pack) > : infrequent > ;; > verify-tag) > : plumbing > ;; > *) > echo $i > ;; > esac; > done >} >__git_match_ctag () >{ > awk "/^${1////\\/}/ { print \$1 }" "$2" >} >__git_pretty_aliases () >{ > local i IFS=' >'; > for i in $(git --git-dir="$(__gitdir)" config --get-regexp "pretty\..*" 2>/dev/null); > do > case "$i" in > pretty.*) > i="${i#pretty.}"; > echo "${i/ */}" > ;; > esac; > done >} >__git_ps1 () >{ > local g="$(__gitdir)"; > if [ -n "$g" ]; then > local r=""; > local b=""; > if [ -f "$g/rebase-merge/interactive" ]; then > r="|REBASE-i"; > b="$(cat "$g/rebase-merge/head-name")"; > else > if [ -d "$g/rebase-merge" ]; then > r="|REBASE-m"; > b="$(cat "$g/rebase-merge/head-name")"; > else > if [ -d "$g/rebase-apply" ]; then > if [ -f "$g/rebase-apply/rebasing" ]; then > r="|REBASE"; > else > if [ -f "$g/rebase-apply/applying" ]; then > r="|AM"; > else > r="|AM/REBASE"; > fi; > fi; > else > if [ -f "$g/MERGE_HEAD" ]; then > r="|MERGING"; > else > if [ -f "$g/CHERRY_PICK_HEAD" ]; then > r="|CHERRY-PICKING"; > else > if [ -f "$g/BISECT_LOG" ]; then > r="|BISECTING"; > fi; > fi; > fi; > fi; > b="$(git symbolic-ref HEAD 2>/dev/null)" || { > b="$( > case "${GIT_PS1_DESCRIBE_STYLE-}" in > (contains) > git describe --contains HEAD ;; > (branch) > git describe --contains --all HEAD ;; > (describe) > git describe HEAD ;; > (* | default) > git describe --tags --exact-match HEAD ;; > esac 2>/dev/null)" || b="$(cut -c1-7 "$g/HEAD" 2>/dev/null)..." || b="unknown"; > b="($b)" > }; > fi; > fi; > local w=""; > local i=""; > local s=""; > local u=""; > local c=""; > local p=""; > if [ "true" = "$(git rev-parse --is-inside-git-dir 2>/dev/null)" ]; then > if [ "true" = "$(git rev-parse --is-bare-repository 2>/dev/null)" ]; then > c="BARE:"; > else > b="GIT_DIR!"; > fi; > else > if [ "true" = "$(git rev-parse --is-inside-work-tree 2>/dev/null)" ]; then > if [ -n "${GIT_PS1_SHOWDIRTYSTATE-}" ]; then > if [ "$(git config --bool bash.showDirtyState)" != "false" ]; then > git diff --no-ext-diff --quiet --exit-code || w="*"; > if git rev-parse --quiet --verify HEAD > /dev/null; then > git diff-index --cached --quiet HEAD -- || i="+"; > else > i="#"; > fi; > fi; > fi; > if [ -n "${GIT_PS1_SHOWSTASHSTATE-}" ]; then > git rev-parse --verify refs/stash > /dev/null 2>&1 && s="$"; > fi; > if [ -n "${GIT_PS1_SHOWUNTRACKEDFILES-}" ]; then > if [ -n "$(git ls-files --others --exclude-standard)" ]; then > u="%"; > fi; > fi; > if [ -n "${GIT_PS1_SHOWUPSTREAM-}" ]; then > __git_ps1_show_upstream; > fi; > fi; > fi; > local f="$w$i$s$u"; > printf -- "${1:- (%s)}" "$c${b##refs/heads/}${f:+ $f}$r$p"; > fi >} >__git_ps1_show_upstream () >{ > local key value; > local svn_remote svn_url_pattern count n; > local upstream=git legacy="" verbose=""; > svn_remote=(); > local output="$(git config -z --get-regexp '^(svn-remote\..*\.url|bash\.showupstream)$' 2>/dev/null | tr '\0\n' '\n ')"; > while read -r key value; do > case "$key" in > bash.showupstream) > GIT_PS1_SHOWUPSTREAM="$value"; > if [[ -z "${GIT_PS1_SHOWUPSTREAM}" ]]; then > p=""; > return; > fi > ;; > svn-remote.*.url) > svn_remote[ $((${#svn_remote[@]} + 1)) ]="$value"; > svn_url_pattern+="\\|$value"; > upstream=svn+git > ;; > esac; > done <<< "$output"; > for option in ${GIT_PS1_SHOWUPSTREAM}; > do > case "$option" in > git | svn) > upstream="$option" > ;; > verbose) > verbose=1 > ;; > legacy) > legacy=1 > ;; > esac; > done; > case "$upstream" in > git) > upstream="@{upstream}" > ;; > svn*) > local svn_upstream=($(git log --first-parent -1 --grep="^git-svn-id: \(${svn_url_pattern#??}\)" 2>/dev/null)); > if [[ 0 -ne ${#svn_upstream[@]} ]]; then > svn_upstream=${svn_upstream[ ${#svn_upstream[@]} - 2 ]}; > svn_upstream=${svn_upstream%@*}; > local n_stop="${#svn_remote[@]}"; > for ((n=1; n <= n_stop; n++)) > do > svn_upstream=${svn_upstream#${svn_remote[$n]}}; > done; > if [[ -z "$svn_upstream" ]]; then > upstream=${GIT_SVN_ID:-git-svn}; > else > upstream=${svn_upstream#/}; > fi; > else > if [[ "svn+git" = "$upstream" ]]; then > upstream="@{upstream}"; > fi; > fi > ;; > esac; > if [[ -z "$legacy" ]]; then > count="$(git rev-list --count --left-right "$upstream"...HEAD 2>/dev/null)"; > else > local commits; > if commits="$(git rev-list --left-right "$upstream"...HEAD 2>/dev/null)"; then > local commit behind=0 ahead=0; > for commit in $commits; > do > case "$commit" in > "<"*) > ((behind++)) > ;; > *) > ((ahead++)) > ;; > esac; > done; > count="$behind $ahead"; > else > count=""; > fi; > fi; > if [[ -z "$verbose" ]]; then > case "$count" in > "") > p="" > ;; > "0 0") > p="=" > ;; > "0 "*) > p=">" > ;; > *" 0") > p="<" > ;; > *) > p="<>" > ;; > esac; > else > case "$count" in > "") > p="" > ;; > "0 0") > p=" u=" > ;; > "0 "*) > p=" u+${count#0 }" > ;; > *" 0") > p=" u-${count% 0}" > ;; > *) > p=" u+${count#* }-${count% *}" > ;; > esac; > fi >} >__git_reassemble_comp_words_by_ref () >{ > local exclude i j first; > exclude="${1//[^$COMP_WORDBREAKS]}"; > cword_=$COMP_CWORD; > if [ -z "$exclude" ]; then > words_=("${COMP_WORDS[@]}"); > return; > fi; > for ((i=0, j=0; i < ${#COMP_WORDS[@]}; i++, j++)) > do > first=t; > while [ $i -gt 0 ] && [ -n "${COMP_WORDS[$i]}" ] && [ "${COMP_WORDS[$i]//[^$exclude]}" = "${COMP_WORDS[$i]}" ]; do > if [ $j -ge 2 ] && [ -n "$first" ]; then > ((j--)); > fi; > first=; > words_[$j]=${words_[j]}${COMP_WORDS[i]}; > if [ $i = $COMP_CWORD ]; then > cword_=$j; > fi; > if (($i < ${#COMP_WORDS[@]} - 1)); then > ((i++)); > else > return; > fi; > done; > words_[$j]=${words_[j]}${COMP_WORDS[i]}; > if [ $i = $COMP_CWORD ]; then > cword_=$j; > fi; > done >} >__git_refs () >{ > local i hash dir="$(__gitdir "${1-}")" track="${2-}"; > local format refs; > if [ -d "$dir" ]; then > case "$cur" in > refs | refs/*) > format="refname"; > refs="${cur%/*}"; > track="" > ;; > *) > for i in HEAD FETCH_HEAD ORIG_HEAD MERGE_HEAD; > do > if [ -e "$dir/$i" ]; then > echo $i; > fi; > done; > format="refname:short"; > refs="refs/tags refs/heads refs/remotes" > ;; > esac; > git --git-dir="$dir" for-each-ref --format="%($format)" $refs; > if [ -n "$track" ]; then > local ref entry; > git --git-dir="$dir" for-each-ref --shell --format="ref=%(refname:short)" "refs/remotes/" | while read -r entry; do > eval "$entry"; > ref="${ref#*/}"; > if [[ "$ref" == "$cur"* ]]; then > echo "$ref"; > fi; > done | uniq -u; > fi; > return; > fi; > case "$cur" in > refs | refs/*) > git ls-remote "$dir" "$cur*" 2> /dev/null | while read -r hash i; do > case "$i" in > *^{}) > > ;; > *) > echo "$i" > ;; > esac; > done > ;; > *) > git ls-remote "$dir" HEAD ORIG_HEAD 'refs/tags/*' 'refs/heads/*' 'refs/remotes/*' 2> /dev/null | while read -r hash i; do > case "$i" in > *^{}) > > ;; > refs/*) > echo "${i#refs/*/}" > ;; > *) > echo "$i" > ;; > esac; > done > ;; > esac >} >__git_refs2 () >{ > local i; > for i in $(__git_refs "$1"); > do > echo "$i:$i"; > done >} >__git_refs_remotes () >{ > local i hash; > git ls-remote "$1" 'refs/heads/*' 2> /dev/null | while read -r hash i; do > echo "$i:refs/remotes/$1/${i#refs/heads/}"; > done >} >__git_remotes () >{ > local i IFS=' >' d="$(__gitdir)"; > test -d "$d/remotes" && ls -1 "$d/remotes"; > for i in $(git --git-dir="$d" config --get-regexp 'remote\..*\.url' 2>/dev/null); > do > i="${i#remote.}"; > echo "${i/.url*/}"; > done >} >__git_tags () >{ > local dir="$(__gitdir)"; > if [ -d "$dir" ]; then > git --git-dir="$dir" for-each-ref --format='%(refname:short)' refs/tags; > return; > fi >} >__gitcomp () >{ > local cur_="${3-$cur}"; > case "$cur_" in > --*=) > COMPREPLY=() > ;; > *) > local IFS=' >'; > COMPREPLY=($(compgen -P "${2-}" -W "$(__gitcomp_1 "${1-}" "${4-}")" -- "$cur_")) > ;; > esac >} >__gitcomp_1 () >{ > local c IFS=' '' '' >'; > for c in $1; > do > case "$c$2" in > --*=*) > printf %s' >' "$c$2" > ;; > *.) > printf %s' >' "$c$2" > ;; > *) > printf %s' >' "$c$2 " > ;; > esac; > done >} >__gitcomp_nl () >{ > local IFS=' >'; > COMPREPLY=($(compgen -P "${2-}" -S "${4- }" -W "$1" -- "${3-$cur}")) >} >__gitdir () >{ > if [ -z "${1-}" ]; then > if [ -n "${__git_dir-}" ]; then > echo "$__git_dir"; > else > if [ -d .git ]; then > echo .git; > else > git rev-parse --git-dir 2> /dev/null; > fi; > fi; > else > if [ -d "$1/.git" ]; then > echo "$1/.git"; > else > echo "$1"; > fi; > fi >} >__gresource () >{ > local choices coffset section; > if [ ${COMP_CWORD} -gt 2 ]; then > if [ ${COMP_WORDS[1]} = --section ]; then > section=${COMP_WORDS[2]}; > coffset=2; > else > coffset=0; > fi; > else > coffset=0; > fi; > case "$((${COMP_CWORD}-$coffset))" in > 1) > choices='--section >help >sections >list >details >extract ' > ;; > 2) > case "${COMP_WORDS[$(($coffset+1))]}" in > --section) > return 0 > ;; > help) > choices='sections >list >details >extract' > ;; > sections | list | details | extract) > COMPREPLY=($(compgen -f -- ${COMP_WORDS[${COMP_CWORD}]})); > return 0 > ;; > esac > ;; > 3) > case "${COMP_WORDS[$(($coffset+1))]}" in > list | details | extract) > choices="$(gresource list ${COMP_WORDS[$(($coffset+2))]} 2> /dev/null | sed -e 's.$. .')" > ;; > esac > ;; > esac; > local IFS=' >'; > COMPREPLY=($(compgen -W "${choices}" -- "${COMP_WORDS[${COMP_CWORD}]}")) >} >__grub_dir () >{ > local i c=1 boot_dir; > for ((c=1; c <= ${#COMP_WORDS[@]}; c++ )) > do > i="${COMP_WORDS[c]}"; > case "$i" in > --boot-directory) > c=$((++c)); > i="${COMP_WORDS[c]}"; > boot_dir="${i##*=}"; > break > ;; > esac; > done; > boot_dir=${boot_dir-/boot}; > echo "${boot_dir%/}/grub2" >} >__grub_get_last_option () >{ > local i; > for ((i=$COMP_CWORD-1; i > 0; i-- )) > do > if [[ "${COMP_WORDS[i]}" == -* ]]; then > echo "${COMP_WORDS[i]}"; > break; > fi; > done >} >__grub_get_options_from_help () >{ > local prog; > if [ $# -ge 1 ]; then > prog="$1"; > else > prog="${COMP_WORDS[0]}"; > fi; > local i IFS=" "' '' >'; > for i in $(LC_ALL=C $prog --help); > do > case $i in > --*) > echo "${i%=*}" > ;; > esac; > done >} >__grub_get_options_from_usage () >{ > local prog; > if [ $# -ge 1 ]; then > prog="$1"; > else > prog="${COMP_WORDS[0]}"; > fi; > local i IFS=" "' '' >'; > for i in $(LC_ALL=C $prog --usage); > do > case $i in > \[--*\]) > i=${i#[}; > echo ${i%%?(=*)]} > ;; > esac; > done >} >__grub_list_menuentries () >{ > local cur="${COMP_WORDS[COMP_CWORD]}"; > local config_file=$(__grub_dir)/grub.cfg; > if [ -f "$config_file" ]; then > local IFS=' >'; > COMPREPLY=($(compgen -W "$( awk -F "[\"']" '/menuentry/ { print $2 }' $config_file )" -- "$cur" )); > fi >} >__grub_list_modules () >{ > local grub_dir=$(__grub_dir); > local IFS=' >'; > COMPREPLY=($( compgen -f -X '!*/*.mod' -- "${grub_dir}/$cur" | { > while read -r tmp; do > [ -n $tmp ] && { > tmp=${tmp##*/} > printf '%s\n' ${tmp%.mod} > } > done > } > )) >} >__grubcomp () >{ > local cur="${COMP_WORDS[COMP_CWORD]}"; > if [ $# -gt 2 ]; then > cur="$3"; > fi; > case "$cur" in > --*=) > COMPREPLY=() > ;; > *) > local IFS=' '' '' >'; > COMPREPLY=($(compgen -P "${2-}" -W "${1-}" -S "${4-}" -- "$cur")) > ;; > esac >} >__gsettings () >{ > local choices coffset schemadir; > if [ ${COMP_CWORD} -gt 2 ]; then > if [ ${COMP_WORDS[1]} = --schemadir ]; then > schemadir=$(eval "echo --schemadir ${COMP_WORDS[2]}"); > coffset=2; > else > coffset=0; > fi; > else > coffset=0; > fi; > case "$((${COMP_CWORD}-$coffset))" in > 1) > choices='--schemadir >help >list-schemas >list-relocatable-schemas >list-keys >list-children >list-recursively >get >range >set >reset >writable >monitor' > ;; > 2) > case "${COMP_WORDS[$(($coffset+1))]}" in > --schemadir) > COMPREPLY=($(compgen -o dirnames -- ${COMP_WORDS[${COMP_CWORD}]})); > return 0 > ;; > help) > choices='list-schemas >list-relocatable-schemas >list-keys >list-children >list-recursively >get >range >set >reset >writable >monitor' > ;; > list-keys | list-children | list-recursively) > choices="$(gsettings $schemadir list-schemas)"' >'"$(gsettings $schemadir list-relocatable-schemas | sed -e 's.$.:/.')" > ;; > get | range | set | reset | writable | monitor) > choices="$(gsettings $schemadir list-schemas | sed -e 's.$. .')"' >'"$(gsettings $schemadir list-relocatable-schemas | sed -e 's.$.:/.')" > ;; > esac > ;; > 3) > case "${COMP_WORDS[$(($coffset+1))]}" in > set) > choices="$(gsettings $schemadir list-keys ${COMP_WORDS[$(($coffset+2))]} 2> /dev/null | sed -e 's.$. .')" > ;; > get | range | reset | writable | monitor) > choices="$(gsettings $schemadir list-keys ${COMP_WORDS[$(($coffset+2))]} 2> /dev/null)" > ;; > esac > ;; > 4) > case "${COMP_WORDS[$(($coffset+2))]}" in > set) > range=($(gsettings $schemadir range ${COMP_WORDS[$(($coffset+2))]} ${COMP_WORDS[$(($coffset+3))]} 2> /dev/null)); > case "${range[0]}" in > enum) > unset range[0] > ;; > *) > unset range > ;; > esac; > local IFS=' >'; > choices="${range[*]}" > ;; > esac > ;; > esac; > local IFS=' >'; > COMPREPLY=($(compgen -W "${choices}" -- "${COMP_WORDS[${COMP_CWORD}]}")) >} >__gvfs_multiple_uris () >{ > local IFS=' >'; > local cur="${COMP_WORDS[COMP_CWORD]}"; > COMPREPLY=($(compgen -W '$(gvfs-ls --show-completions "$cur")' -- "")); > case "$cur" in > *:*) > case "$COMP_WORDBREAKS" in > *:*) > colon_prefix=$(echo $cur | sed 's/:[^:]*$/:/' ); > COMPREPLY=${COMPREPLY##${colon_prefix}} > ;; > esac > ;; > esac >} >__ibus () >{ > COMPREPLY=(); > local cur_=$2 prev_=$3 cur words cword prev; > _get_comp_words_by_ref -n =: cur words cword prev; > local cmds=(engine list-engine watch restart exit); > local i c cmd subcmd; > for ((i=1; i < ${#words[@]}-1; i++)) > do > [[ -n $cmd ]] && subcmd=${words[i]} && break; > for c in ${cmds[@]}; > do > [[ ${words[i]} == $c ]] && cmd=$c && break; > done; > done; > case $cmd in > engine) > __ibus_engine; > return 0 > ;; > list-engine) > __ibus_list_engine; > return 0 > ;; > watch) > return 0 > ;; > *) > COMPREPLY=($( compgen -W '${cmds[@]}' -- "$cur" )); > return 0 > ;; > esac >} >__ibus_engine () >{ > if [[ "$cmd" == "$prev" ]]; then > local imes=$( ibus list-engine --name-only 2>/dev/null ); > COMPREPLY=($( compgen -W "$imes" -- "$cur" | sed "s/^$cur/$cur_/" )); > fi >} >__ibus_list_engine () >{ > if [[ "$cur" == -* ]]; then > local options=(--name-only); > COMPREPLY=($( compgen -W '${options[@]}' -- "$cur" )); > fi >} >__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=; > for i in $1; > do > case $i in > ---*) > break > ;; > --?*) > option=$i; > break > ;; > -?*) > [[ -n $option ]] || option=$i > ;; > *) > break > ;; > esac; > done; > [[ -n $option ]] || return 0; > 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/=*/=}" >} >__pkconcomp () >{ > local all c s=' >' IFS=' '' '' >'; > local cur="${COMP_WORDS[COMP_CWORD]}"; > if [ $# -gt 2 ]; then > cur="$3"; > fi; > for c in $1; > do > case "$c$4" in > *.) > all="$all$c$4$s" > ;; > *) > all="$all$c$4 $s" > ;; > esac; > done; > IFS=$s; > COMPREPLY=($(compgen -P "$2" -W "$all" -- "$cur")); > return >} >__reassemble_comp_words_by_ref () >{ > local exclude i j line ref; > if [[ -n $1 ]]; then > exclude="${1//[^$COMP_WORDBREAKS]}"; > fi; > eval $3=$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 != [' ']* ]] && (( j >= 2 )) && ((j--)); > ref="$2[$j]"; > eval $2[$j]=\${!ref}\${COMP_WORDS[i]}; > [[ $i == $COMP_CWORD ]] && eval $3=$j; > line=${line#*"${COMP_WORDS[$i]}"}; > [[ $line == [' ']* ]] && ((j++)); > (( $i < ${#COMP_WORDS[@]} - 1)) && ((i++)) || break 2; > done; > ref="$2[$j]"; > eval $2[$j]=\${!ref}\${COMP_WORDS[i]}; > line=${line#*"${COMP_WORDS[i]}"}; > [[ $i == $COMP_CWORD ]] && eval $3=$j; > done; > else > eval $2=\( \"\${COMP_WORDS[@]}\" \); > fi >} >__systemctl () >{ > systemctl --full --no-legend "$@" >} >__udisks () >{ > local IFS=' >'; > local cur="${COMP_WORDS[COMP_CWORD]}"; > if [ "${COMP_WORDS[$(($COMP_CWORD - 1))]}" = "--show-info" ]; then > COMPREPLY=($(compgen -W "$(udisks --enumerate-device-files)" -- $cur)); > else > if [ "${COMP_WORDS[$(($COMP_CWORD - 1))]}" = "--inhibit-polling" ]; then > COMPREPLY=($(compgen -W "$(udisks --enumerate-device-files)" -- $cur)); > else > if [ "${COMP_WORDS[$(($COMP_CWORD - 1))]}" = "--mount" ]; then > COMPREPLY=($(compgen -W "$(udisks --enumerate-device-files)" -- $cur)); > else > if [ "${COMP_WORDS[$(($COMP_CWORD - 1))]}" = "--unmount" ]; then > COMPREPLY=($(compgen -W "$(udisks --enumerate-device-files)" -- $cur)); > else > if [ "${COMP_WORDS[$(($COMP_CWORD - 1))]}" = "--detach" ]; then > COMPREPLY=($(compgen -W "$(udisks --enumerate-device-files)" -- $cur)); > else > if [ "${COMP_WORDS[$(($COMP_CWORD - 1))]}" = "--eject" ]; then > COMPREPLY=($(compgen -W "$(udisks --enumerate-device-files)" -- $cur)); > else > if [ "${COMP_WORDS[$(($COMP_CWORD - 1))]}" = "--ata-smart-refresh" ]; then > COMPREPLY=($(compgen -W "$(udisks --enumerate-device-files)" -- $cur)); > else > if [ "${COMP_WORDS[$(($COMP_CWORD - 1))]}" = "--ata-smart-simulate" ]; then > _filedir || return 0; > else > if [ "${COMP_WORDS[$(($COMP_CWORD - 1))]}" = "--set-spindown" ]; then > COMPREPLY=($(compgen -W "$(udisks --enumerate-device-files)" -- $cur)); > else > if [ "${COMP_WORDS[$(($COMP_CWORD - 1))]}" = "--poll-for-media" ]; then > COMPREPLY=($(compgen -W "$(udisks --enumerate-device-files)" -- $cur)); > else > COMPREPLY=($(IFS=: compgen -W "--dump:--inhibit-polling:--inhibit-all-polling:--enumerate:--enumerate-device-files:--monitor:--monitor-detail:--show-info:--help:--mount:--mount-fstype:--mount-options:--unmount:--unmount-options:--detach:--detach-options:--eject:--eject-options:--ata-smart-refresh:--ata-smart-wakeup:--ata-smart-simulate:--set-spindown:--set-spindown-all:--spindown-timeout:--poll-for-media" -- $cur)); > fi; > fi; > fi; > fi; > fi; > fi; > fi; > fi; > fi; > fi >} >__udisksctl () >{ > local IFS=' >'; > local cur=`_get_cword :`; > local suggestions=$(udisksctl complete "${COMP_LINE}" ${COMP_POINT}); > if [ "$suggestions" = "@FILES@" ]; then > _filedir; > else > COMPREPLY=($(compgen -W "$suggestions" -- "$cur")); > fi; > case "$cur" in > *:*) > case "$COMP_WORDBREAKS" in > *:*) > local colon_word=${cur%${cur##*:}}; > local i=${#COMPREPLY[*]}; > while [ $((--i)) -ge 0 ]; do > COMPREPLY[$i]=${COMPREPLY[$i]#"$colon_word"}; > done > ;; > esac > ;; > esac >} >_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 >} >_available_interfaces () >{ > local cmd; > if [[ ${1:-} == -w ]]; then > cmd="iwconfig"; > else > if [[ ${1:-} == -a ]]; then > cmd="ifconfig"; > else > cmd="ifconfig -a"; > fi; > fi; > COMPREPLY=($( eval PATH="$PATH:/sbin" $cmd 2>/dev/null | awk '/^[^ \t]/ { print $1 }' )); > COMPREPLY=($( compgen -W '${COMPREPLY[@]/%[[:punct:]]/}' -- "$cur" )) >} >_bzr_lazy () >{ > unset _bzr; > eval "$(bzr bash-completion)"; > if [[ $(type -t _bzr) == function ]]; then > unset _bzr_lazy; > _bzr; > return $?; > else > return 1; > fi >} >_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 0; > 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 0 >} >_cd_devices () >{ > COMPREPLY+=($( compgen -f -d -X "!*/?([amrs])cd*" -- "${cur:-/dev/}" )) >} >_colormgr () >{ > local i c=1 command; > while [ $c -lt $COMP_CWORD ]; do > i="${COMP_WORDS[c]}"; > case "$i" in > --help | --verbose | -v | -h | -?) > > ;; > *) > command="$i"; > break > ;; > esac; > c=$((++c)); > done; > if [ $c -eq $COMP_CWORD -a -z "$command" ]; then > case "${COMP_WORDS[COMP_CWORD]}" in > --*=*) > COMPREPLY=() > ;; > --*) > __colormgrcomp " > --verbose > --help > " > ;; > -*) > __colormgrcomp " > -v > -h > -? > " > ;; > *) > __colormgrcomp "$__colormgr_commandlist" > ;; > esac; > return; > fi; > case "$command" in > *) > COMPREPLY=() > ;; > esac >} >_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 t; > while true; do > t=${cspec#*-o }; > if [[ $t == $cspec ]]; then > break; > fi; > opt=${t%% *}; > compopt -o $opt; > cspec=${t#$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 >} >_complete_as_root () >{ > [[ $EUID -eq 0 || -n ${root_command:-} ]] >} >_completion_loader () >{ > local compdir=./completions; > [[ $BASH_SOURCE == */* ]] && compdir="${BASH_SOURCE%/*}/completions"; > . "$compdir/${1##*/}" &>/dev/null && return 124; > complete -F _minimal "$1" && return 124 >} >_configured_interfaces () >{ > if [[ -f /etc/debian_version ]]; then > COMPREPLY=($( compgen -W "$( sed -ne 's|^iface \([^ ]\{1,\}\).*$|\1|p' /etc/network/interfaces )" -- "$cur" )); > else > if [[ -f /etc/SuSE-release ]]; then > COMPREPLY=($( compgen -W "$( printf '%s\n' /etc/sysconfig/network/ifcfg-* | sed -ne 's|.*ifcfg-\(.*\)|\1|p' )" -- "$cur" )); > else > if [[ -f /etc/pld-release ]]; then > COMPREPLY=($( compgen -W "$( command ls -B /etc/sysconfig/interfaces | sed -ne 's|.*ifcfg-\(.*\)|\1|p' )" -- "$cur" )); > else > COMPREPLY=($( compgen -W "$( printf '%s\n' /etc/sysconfig/network-scripts/ifcfg-* | 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 >} >_cr_compress_type () >{ > COMPREPLY=($( compgen -W "$( ${1:-createrepo} --compress-type=FOO / 2>&1 | sed -ne 's/,/ /g' -ne 's/.*[Cc]ompression.*://p' )" -- "$2" )) >} >_cr_createrepo () >{ > COMPREPLY=(); > case $3 in > --version | -h | --help | -u | --baseurl | --distro | --content | --repo | --revision | -x | --excludes | --changelog-limit | --max-delta-rpm-size) > return 0 > ;; > --basedir | -c | --cachedir | --update-md-path | -o | --outputdir | --oldpackagedirs) > COMPREPLY=($( compgen -d -- "$2" )); > return 0 > ;; > -g | --groupfile) > COMPREPLY=($( compgen -f -o plusdirs -X '!*.xml' -- "$2" )); > return 0 > ;; > -s | --sumtype) > COMPREPLY=($( compgen -W 'md5 sha1 sha256 sha512' -- "$2" )); > return 0 > ;; > -i | --pkglist | --read-pkgs-list) > COMPREPLY=($( compgen -f -o plusdirs -- "$2" )); > return 0 > ;; > -n | --includepkg) > COMPREPLY=($( compgen -f -o plusdirs -X '!*.rpm' -- "$2" )); > return 0 > ;; > --retain-old-md) > COMPREPLY=($( compgen -W '0 1 2 3 4 5 6 7 8 9' -- "$2" )); > return 0 > ;; > --num-deltas) > COMPREPLY=($( compgen -W '1 2 3 4 5 6 7 8 9' -- "$2" )); > return 0 > ;; > --workers) > local min=2 max=$( getconf _NPROCESSORS_ONLN 2>/dev/null ); > [[ -z $max || $max -lt $min ]] && max=$min; > COMPREPLY=($( compgen -W "{1..$max}" -- "$2" )); > return 0 > ;; > --compress-type) > _cr_compress_type "$1" "$2"; > return 0 > ;; > esac; > if [[ $2 == -* ]]; then > COMPREPLY=($( compgen -W '--version --help --quiet --verbose --profile > --excludes --basedir --baseurl --groupfile --checksum --pretty > --cachedir --checkts --no-database --update --update-md-path > --skip-stat --split --pkglist --includepkg --outputdir > --skip-symlinks --changelog-limit --unique-md-filenames > --simple-md-filenames --retain-old-md --distro --content --repo > --revision --deltas --oldpackagedirs --num-deltas --read-pkgs-list > --max-delta-rpm-size --workers --xz --compress-type' -- "$2" )); > else > COMPREPLY=($( compgen -d -- "$2" )); > fi >} >_cr_mergerepo () >{ > COMPREPLY=(); > case $3 in > --version | -h | --help | -a | --archlist) > return 0 > ;; > -r | --repo | -o | --outputdir) > COMPREPLY=($( compgen -d -- "$2" )); > return 0 > ;; > --compress-type) > _cr_compress_type "" "$2"; > return 0 > ;; > esac; > COMPREPLY=($( compgen -W '--version --help --repo --archlist --no-database > --outputdir --nogroups --noupdateinfo --compress-type' -- "$2" )) >} >_cr_modifyrepo () >{ > COMPREPLY=(); > case $3 in > --version | -h | --help | --mdtype) > return 0 > ;; > --compress-type) > _cr_compress_type "" "$2"; > return 0 > ;; > esac; > if [[ $2 == -* ]]; then > COMPREPLY=($( compgen -W '--version --help --mdtype --remove > --compress --compress-type' -- "$2" )); > return 0; > fi; > local i argnum=1; > for ((i=1; i < ${#COMP_WORDS[@]}-1; i++ )) > do > if [[ ${COMP_WORDS[i]} != -* && ${COMP_WORDS[i-1]} != @(=|--@(md|compress-)type) ]]; then > argnum=$(( argnum+1 )); > fi; > done; > case $argnum in > 1) > COMPREPLY=($( compgen -f -o plusdirs -- "$2" )); > return 0 > ;; > 2) > COMPREPLY=($( compgen -d -- "$2" )); > return 0 > ;; > esac >} >_django_completion () >{ > COMPREPLY=($( COMP_WORDS="${COMP_WORDS[*]}" COMP_CWORD=$COMP_CWORD DJANGO_AUTO_COMPLETE=1 $1 )) >} >_dvd_devices () >{ > COMPREPLY+=($( compgen -f -d -X "!*/?(r)dvd*" -- "${cur:-/dev/}" )) >} >_expand () >{ > if [[ "$cur" == \~*/* ]]; then > eval cur=$cur; > else > if [[ "$cur" == \~* ]]; then > cur=${cur#\~}; > COMPREPLY=($( compgen -P '~' -u "$cur" )); > [[ ${#COMPREPLY[@]} -eq 1 ]] && eval COMPREPLY[0]=${COMPREPLY[0]}; > return ${#COMPREPLY[@]}; > fi; > fi >} >_fedpkg () >{ > COMPREPLY=(); > function in_array () > { > local i; > for i in $2; > do > [[ $i = $1 ]] && return 0; > done; > return 1 > }; > function _filedir_exclude_paths () > { > _filedir "$@"; > for ((i=0; i<=${#COMPREPLY[@]}; i++)) > do > [[ ${COMPREPLY[$i]} =~ /?\.git/? ]] && unset COMPREPLY[$i]; > done > }; > local cur prev; > if type _get_comp_words_by_ref &>/dev/null; then > _get_comp_words_by_ref cur prev; > else > cur="${COMP_WORDS[COMP_CWORD]}"; > prev="${COMP_WORDS[COMP_CWORD-1]}"; > fi; > local options="--help -v -q"; > local options_value="--dist --user --path"; > local commands="build chain-build ci clean clog clone co commit compile diff gimmespec giturl help gitbuildurl import install lint local mockbuild mock-config new new-sources patch prep pull push retire scratch-build sources srpm switch-branch tag tag-request unused-patches update upload verify-files verrel"; > local command=; > local command_first=; > local path=; > local i w; > for ((i = 0; i < ${#COMP_WORDS[*]} - 1; i++ )) > do > w="${COMP_WORDS[$i]}"; > if [[ ${w:0:1} = - ]]; then > if in_array "$w" "$options_value"; then > ((i++)); > [[ "$w" = --path ]] && path="${COMP_WORDS[$i]}"; > fi; > else > if in_array "$w" "$commands"; then > command="$w"; > command_first=$((i+1)); > break; > fi; > fi; > done; > if [[ -z $command ]]; then > if [[ $cur == -* ]]; then > COMPREPLY=($(compgen -W "$options $options_value" -- "$cur")); > return 0; > fi; > case "$prev" in > --dist) > > ;; > --user | -u) > > ;; > --path) > _filedir_exclude_paths > ;; > *) > COMPREPLY=($(compgen -W "$commands" -- "$cur")) > ;; > esac; > return 0; > fi; > local options=; > local options_target= options_arches= options_branch= options_string= options_file= options_dir= options_srpm=; > local after= after_more=; > case $command in > help | gimmespec | gitbuildurl | giturl | lint | new | push | unused-patches | update | verrel) > > ;; > build) > options="--nowait --background --skip-tag --scratch"; > options_srpm="--srpm"; > options_target="--target" > ;; > chain-build) > options="--nowait --background"; > options_target="--target"; > after="package"; > after_more=true > ;; > clean) > options="--dry-run -x" > ;; > clog) > options="--raw" > ;; > clone | co) > options="--branches --anonymous"; > options_branch="-b"; > after="package" > ;; > commit | ci) > options="--push --clog --raw --tag"; > options_string="--message"; > options_file="--file"; > after="file"; > after_more=true > ;; > compile | install) > options="--short-circuit"; > options_arch="--arch"; > options_dir="--builddir" > ;; > diff) > options="--cached"; > after="file"; > after_more=true > ;; > import) > options="--create"; > options_branch="--branch"; > after="srpm" > ;; > lint) > options="--info" > ;; > local) > options="--md5"; > options_arch="--arch"; > options_dir="--builddir" > ;; > mock-config) > options="--target"; > options_arch="--arch" > ;; > mockbuild) > options="--md5"; > options_mroot="--root" > ;; > patch) > options="--rediff"; > options_string="--suffix" > ;; > prep | verify-files) > options_arch="--arch"; > options_dir="--builddir" > ;; > pull) > options="--rebase --no-rebase" > ;; > retire) > options="--push"; > after_more=true > ;; > scratch-build) > options="--nowait --background"; > options_target="--target"; > options_arches="--arches"; > options_srpm="--srpm" > ;; > sources) > options_dir="--outdir" > ;; > srpm) > options="--md5" > ;; > switch-branch) > options="--list"; > after="branch" > ;; > tag) > options="--clog --raw --force --list --delete"; > options_string="--message"; > options_file="--file"; > after_more=true > ;; > tag-request) > options_string="--desc --build" > ;; > upload | new-sources) > after="file"; > after_more=true > ;; > esac; > local all_options="--help $options"; > local all_options_value="$options_target $options_arches $options_branch $options_string $options_file $options_dir $options_srpm"; > local i w; > local last_option=; > local after_counter=0; > for ((i = $command_first; i < ${#COMP_WORDS[*]} - 1; i++)) > do > w="${COMP_WORDS[$i]}"; > if [[ ${w:0:1} = - ]]; then > if in_array "$w" "$all_options"; then > last_option="$w"; > continue; > else > if in_array "$w" "$all_options_value"; then > last_option="$w"; > ((i++)); > continue; > fi; > fi; > fi; > in_array "$last_option" "$options_arches" || ((after_counter++)); > done; > if [[ -n $options_target ]] && in_array "$prev" "$options_target"; then > COMPREPLY=($(compgen -W "$(_fedpkg_target)" -- "$cur")); > else > if [[ -n $options_arches ]] && in_array "$last_option" "$options_arches"; then > COMPREPLY=($(compgen -W "$(_fedpkg_arch) $all_options" -- "$cur")); > else > if [[ -n $options_srpm ]] && in_array "$prev" "$options_srpm"; then > _filedir_exclude_paths "*.src.rpm"; > else > if [[ -n $options_branch ]] && in_array "$prev" "$options_branch"; then > COMPREPLY=($(compgen -W "$(_fedpkg_branch "$path")" -- "$cur")); > else > if [[ -n $options_file ]] && in_array "$prev" "$options_file"; then > _filedir_exclude_paths; > else > if [[ -n $options_dir ]] && in_array "$prev" "$options_dir"; then > _filedir_exclude_paths -d; > else > if [[ -n $options_string ]] && in_array "$prev" "$options_string"; then > COMPREPLY=(); > else > local after_options=; > if [[ $after_counter -eq 0 ]] || [[ $after_more = true ]]; then > case $after in > file) > _filedir_exclude_paths > ;; > srpm) > _filedir_exclude_paths "*.src.rpm" > ;; > branch) > after_options="$(_fedpkg_branch "$path")" > ;; > package) > after_options="$(_fedpkg_package "$cur")" > ;; > esac; > fi; > if [[ $cur != -* ]]; then > all_options=; > all_options_value=; > fi; > COMPREPLY+=($(compgen -W "$all_options $all_options_value $after_options" -- "$cur" )); > fi; > fi; > fi; > fi; > fi; > fi; > fi; > return 0 >} >_fedpkg_arch () >{ > echo "i386 x86_64 ppc ppc64 s390 s390x sparc sparc64" >} >_fedpkg_branch () >{ > local git_options= format="--format %(refname:short)"; > [[ -n $1 ]] && git_options="--git-dir=$1/.git"; > git $git_options for-each-ref $format 'refs/remotes' | sed 's,.*/,,'; > git $git_options for-each-ref $format 'refs/heads' >} >_fedpkg_package () >{ > repoquery -C --qf=%{sourcerpm} "$1*" 2> /dev/null | sort -u | sed -r 's/(-[^-]*){2}\.src\.rpm$//' >} >_fedpkg_target () >{ > koji list-targets --quiet 2> /dev/null | cut -d" " -f1 >} >_filedir () >{ > local i IFS=' >' xspec; > _tilde "$cur" || return 0; > local -a toks; > local quoted tmp; > _quote_readline_by_ref "$cur" quoted; > toks=($( > compgen -d -- "$quoted" | { > while read -r tmp; do > # TODO: I have removed a "[ -n $tmp ] &&" before 'printf ..', > # and everything works again. If this bug suddenly > # appears again (i.e. "cd /b<TAB>" becomes "cd /"), > # remember to check for other similar conditionals (here > # and _filedir_xspec()). --David > printf '%s\n' $tmp > done > } > )); > if [[ "$1" != -d ]]; then > xspec=${1:+"!*.@($1|${1^^})"}; > toks+=($( compgen -f -X "$xspec" -- $quoted )); > fi; > [[ -n ${COMP_FILEDIR_FALLBACK:-} && -n "$1" && "$1" != -d && ${#toks[@]} -lt 1 ]] && toks+=($( compgen -f -- $quoted )); > if [[ ${#toks[@]} -ne 0 ]]; then > compopt -o filenames 2> /dev/null; > COMPREPLY+=("${toks[@]}"); > fi >} >_filedir_xspec () >{ > local cur prev words cword; > _init_completion || return; > _expand || return 0; > local IFS=' >' xspec=${_xspecs[${1##*/}]} tmp; > local -a toks; > toks=($( > compgen -d -- "$(quote_readline "$cur")" | { > while read -r tmp; do > # see long TODO comment in _filedir() --David > 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" )) >} >_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--)); > 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 >} >_getsebool () >{ > local command=${COMP_WORDS[1]}; > local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}; > local verb comps; > if [ "$verb" = "" -a "$prev" == "getsebool" ]; then > COMPREPLY=($(compgen -W "-a $( __get_all_booleans ) " -- "$cur")); > return 0; > fi; > if [ "$verb" = "" -a "$prev" != "-a" ]; then > COMPREPLY=($(compgen -W "$( __get_all_booleans ) " -- "$cur")); > return 0; > fi; > return 0 >} >_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 >} >_git () >{ > local i c=1 command __git_dir; > if [[ -n ${ZSH_VERSION-} ]]; then > emulate -L bash; > setopt KSH_TYPESET; > typeset -h words; > typeset -h IFS; > fi; > local cur words cword prev; > _get_comp_words_by_ref -n =: cur words cword prev; > while [ $c -lt $cword ]; do > i="${words[c]}"; > case "$i" in > --git-dir=*) > __git_dir="${i#--git-dir=}" > ;; > --bare) > __git_dir="." > ;; > --version | -p | --paginate) > > ;; > --help) > command="help"; > break > ;; > *) > command="$i"; > break > ;; > esac; > ((c++)); > done; > if [ -z "$command" ]; then > case "$cur" in > --*) > __gitcomp " > --paginate > --no-pager > --git-dir= > --bare > --version > --exec-path > --html-path > --work-tree= > --namespace= > --help > " > ;; > *) > __git_compute_porcelain_commands; > __gitcomp "$__git_porcelain_commands $(__git_aliases)" > ;; > esac; > return; > fi; > local completion_func="_git_${command//-/_}"; > declare -f $completion_func > /dev/null && $completion_func && return; > local expansion=$(__git_aliased_command "$command"); > if [ -n "$expansion" ]; then > completion_func="_git_${expansion//-/_}"; > declare -f $completion_func > /dev/null && $completion_func; > fi >} >_git_add () >{ > __git_has_doubledash && return; > case "$cur" in > --*) > __gitcomp " > --interactive --refresh --patch --update --dry-run > --ignore-errors --intent-to-add > "; > return > ;; > esac; > COMPREPLY=() >} >_git_am () >{ > local dir="$(__gitdir)"; > if [ -d "$dir"/rebase-apply ]; then > __gitcomp "--skip --continue --resolved --abort"; > return; > fi; > case "$cur" in > --whitespace=*) > __gitcomp "$__git_whitespacelist" "" "${cur##--whitespace=}"; > return > ;; > --*) > __gitcomp " > --3way --committer-date-is-author-date --ignore-date > --ignore-whitespace --ignore-space-change > --interactive --keep --no-utf8 --signoff --utf8 > --whitespace= --scissors > "; > return > ;; > esac; > COMPREPLY=() >} >_git_apply () >{ > case "$cur" in > --whitespace=*) > __gitcomp "$__git_whitespacelist" "" "${cur##--whitespace=}"; > return > ;; > --*) > __gitcomp " > --stat --numstat --summary --check --index > --cached --index-info --reverse --reject --unidiff-zero > --apply --no-add --exclude= > --ignore-whitespace --ignore-space-change > --whitespace= --inaccurate-eof --verbose > "; > return > ;; > esac; > COMPREPLY=() >} >_git_archive () >{ > case "$cur" in > --format=*) > __gitcomp "$(git archive --list)" "" "${cur##--format=}"; > return > ;; > --remote=*) > __gitcomp_nl "$(__git_remotes)" "" "${cur##--remote=}"; > return > ;; > --*) > __gitcomp " > --format= --list --verbose > --prefix= --remote= --exec= > "; > return > ;; > esac; > __git_complete_file >} >_git_bisect () >{ > __git_has_doubledash && return; > local subcommands="start bad good skip reset visualize replay log run"; > local subcommand="$(__git_find_on_cmdline "$subcommands")"; > if [ -z "$subcommand" ]; then > if [ -f "$(__gitdir)"/BISECT_START ]; then > __gitcomp "$subcommands"; > else > __gitcomp "replay start"; > fi; > return; > fi; > case "$subcommand" in > bad | good | reset | skip | start) > __gitcomp_nl "$(__git_refs)" > ;; > *) > COMPREPLY=() > ;; > esac >} >_git_branch () >{ > local i c=1 only_local_ref="n" has_r="n"; > while [ $c -lt $cword ]; do > i="${words[c]}"; > case "$i" in > -d | -m) > only_local_ref="y" > ;; > -r) > has_r="y" > ;; > esac; > ((c++)); > done; > case "$cur" in > --*) > __gitcomp " > --color --no-color --verbose --abbrev= --no-abbrev > --track --no-track --contains --merged --no-merged > --set-upstream --edit-description --list > " > ;; > *) > if [ $only_local_ref = "y" -a $has_r = "n" ]; then > __gitcomp_nl "$(__git_heads)"; > else > __gitcomp_nl "$(__git_refs)"; > fi > ;; > esac >} >_git_bundle () >{ > local cmd="${words[2]}"; > case "$cword" in > 2) > __gitcomp "create list-heads verify unbundle" > ;; > 3) > > ;; > *) > case "$cmd" in > create) > __git_complete_revlist > ;; > esac > ;; > esac >} >_git_checkout () >{ > __git_has_doubledash && return; > case "$cur" in > --conflict=*) > __gitcomp "diff3 merge" "" "${cur##--conflict=}" > ;; > --*) > __gitcomp " > --quiet --ours --theirs --track --no-track --merge > --conflict= --orphan --patch > " > ;; > *) > local flags="--track --no-track --no-guess" track=1; > if [ -n "$(__git_find_on_cmdline "$flags")" ]; then > track=''; > fi; > __gitcomp_nl "$(__git_refs '' $track)" > ;; > esac >} >_git_cherry () >{ > __gitcomp "$(__git_refs)" >} >_git_cherry_pick () >{ > case "$cur" in > --*) > __gitcomp "--edit --no-commit" > ;; > *) > __gitcomp_nl "$(__git_refs)" > ;; > esac >} >_git_clean () >{ > __git_has_doubledash && return; > case "$cur" in > --*) > __gitcomp "--dry-run --quiet"; > return > ;; > esac; > COMPREPLY=() >} >_git_clone () >{ > case "$cur" in > --*) > __gitcomp " > --local > --no-hardlinks > --shared > --reference > --quiet > --no-checkout > --bare > --mirror > --origin > --upload-pack > --template= > --depth > "; > return > ;; > esac; > COMPREPLY=() >} >_git_commit () >{ > __git_has_doubledash && return; > case "$cur" in > --cleanup=*) > __gitcomp "default strip verbatim whitespace > " "" "${cur##--cleanup=}"; > return > ;; > --reuse-message=* | --reedit-message=* | --fixup=* | --squash=*) > __gitcomp_nl "$(__git_refs)" "" "${cur#*=}"; > return > ;; > --untracked-files=*) > __gitcomp "all no normal" "" "${cur##--untracked-files=}"; > return > ;; > --*) > __gitcomp " > --all --author= --signoff --verify --no-verify > --edit --amend --include --only --interactive > --dry-run --reuse-message= --reedit-message= > --reset-author --file= --message= --template= > --cleanup= --untracked-files --untracked-files= > --verbose --quiet --fixup= --squash= > "; > return > ;; > esac; > COMPREPLY=() >} >_git_config () >{ > case "$prev" in > branch.*.remote) > __gitcomp_nl "$(__git_remotes)"; > return > ;; > branch.*.merge) > __gitcomp_nl "$(__git_refs)"; > return > ;; > remote.*.fetch) > local remote="${prev#remote.}"; > remote="${remote%.fetch}"; > if [ -z "$cur" ]; then > COMPREPLY=("refs/heads/"); > return; > fi; > __gitcomp_nl "$(__git_refs_remotes "$remote")"; > return > ;; > remote.*.push) > local remote="${prev#remote.}"; > remote="${remote%.push}"; > __gitcomp_nl "$(git --git-dir="$(__gitdir)" for-each-ref --format='%(refname):%(refname)' refs/heads)"; > return > ;; > pull.twohead | pull.octopus) > __git_compute_merge_strategies; > __gitcomp "$__git_merge_strategies"; > return > ;; > color.branch | color.diff | color.interactive | color.showbranch | color.status | color.ui) > __gitcomp "always never auto"; > return > ;; > color.pager) > __gitcomp "false true"; > return > ;; > color.*.*) > __gitcomp " > normal black red green yellow blue magenta cyan white > bold dim ul blink reverse > "; > return > ;; > help.format) > __gitcomp "man info web html"; > return > ;; > log.date) > __gitcomp "$__git_log_date_formats"; > return > ;; > sendemail.aliasesfiletype) > __gitcomp "mutt mailrc pine elm gnus"; > return > ;; > sendemail.confirm) > __gitcomp "$__git_send_email_confirm_options"; > return > ;; > sendemail.suppresscc) > __gitcomp "$__git_send_email_suppresscc_options"; > return > ;; > --get | --get-all | --unset | --unset-all) > __gitcomp_nl "$(__git_config_get_set_variables)"; > return > ;; > *.*) > COMPREPLY=(); > return > ;; > esac; > case "$cur" in > --*) > __gitcomp " > --global --system --file= > --list --replace-all > --get --get-all --get-regexp > --add --unset --unset-all > --remove-section --rename-section > "; > return > ;; > branch.*.*) > local pfx="${cur%.*}." cur_="${cur##*.}"; > __gitcomp "remote merge mergeoptions rebase" "$pfx" "$cur_"; > return > ;; > branch.*) > local pfx="${cur%.*}." cur_="${cur#*.}"; > __gitcomp_nl "$(__git_heads)" "$pfx" "$cur_" "."; > return > ;; > guitool.*.*) > local pfx="${cur%.*}." cur_="${cur##*.}"; > __gitcomp " > argprompt cmd confirm needsfile noconsole norescan > prompt revprompt revunmerged title > " "$pfx" "$cur_"; > return > ;; > difftool.*.*) > local pfx="${cur%.*}." cur_="${cur##*.}"; > __gitcomp "cmd path" "$pfx" "$cur_"; > return > ;; > man.*.*) > local pfx="${cur%.*}." cur_="${cur##*.}"; > __gitcomp "cmd path" "$pfx" "$cur_"; > return > ;; > mergetool.*.*) > local pfx="${cur%.*}." cur_="${cur##*.}"; > __gitcomp "cmd path trustExitCode" "$pfx" "$cur_"; > return > ;; > pager.*) > local pfx="${cur%.*}." cur_="${cur#*.}"; > __git_compute_all_commands; > __gitcomp_nl "$__git_all_commands" "$pfx" "$cur_"; > return > ;; > remote.*.*) > local pfx="${cur%.*}." cur_="${cur##*.}"; > __gitcomp " > url proxy fetch push mirror skipDefaultUpdate > receivepack uploadpack tagopt pushurl > " "$pfx" "$cur_"; > return > ;; > remote.*) > local pfx="${cur%.*}." cur_="${cur#*.}"; > __gitcomp_nl "$(__git_remotes)" "$pfx" "$cur_" "."; > return > ;; > url.*.*) > local pfx="${cur%.*}." cur_="${cur##*.}"; > __gitcomp "insteadOf pushInsteadOf" "$pfx" "$cur_"; > return > ;; > esac; > __gitcomp " > add.ignoreErrors > advice.commitBeforeMerge > advice.detachedHead > advice.implicitIdentity > advice.pushNonFastForward > advice.resolveConflict > advice.statusHints > alias. > am.keepcr > apply.ignorewhitespace > apply.whitespace > branch.autosetupmerge > branch.autosetuprebase > browser. > clean.requireForce > color.branch > color.branch.current > color.branch.local > color.branch.plain > color.branch.remote > color.decorate.HEAD > color.decorate.branch > color.decorate.remoteBranch > color.decorate.stash > color.decorate.tag > color.diff > color.diff.commit > color.diff.frag > color.diff.func > color.diff.meta > color.diff.new > color.diff.old > color.diff.plain > color.diff.whitespace > color.grep > color.grep.context > color.grep.filename > color.grep.function > color.grep.linenumber > color.grep.match > color.grep.selected > color.grep.separator > color.interactive > color.interactive.error > color.interactive.header > color.interactive.help > color.interactive.prompt > color.pager > color.showbranch > color.status > color.status.added > color.status.changed > color.status.header > color.status.nobranch > color.status.untracked > color.status.updated > color.ui > commit.status > commit.template > core.abbrev > core.askpass > core.attributesfile > core.autocrlf > core.bare > core.bigFileThreshold > core.compression > core.createObject > core.deltaBaseCacheLimit > core.editor > core.eol > core.excludesfile > core.fileMode > core.fsyncobjectfiles > core.gitProxy > core.ignoreCygwinFSTricks > core.ignoreStat > core.ignorecase > core.logAllRefUpdates > core.loosecompression > core.notesRef > core.packedGitLimit > core.packedGitWindowSize > core.pager > core.preferSymlinkRefs > core.preloadindex > core.quotepath > core.repositoryFormatVersion > core.safecrlf > core.sharedRepository > core.sparseCheckout > core.symlinks > core.trustctime > core.warnAmbiguousRefs > core.whitespace > core.worktree > diff.autorefreshindex > diff.statGraphWidth > diff.external > diff.ignoreSubmodules > diff.mnemonicprefix > diff.noprefix > diff.renameLimit > diff.renames > diff.suppressBlankEmpty > diff.tool > diff.wordRegex > difftool. > difftool.prompt > fetch.recurseSubmodules > fetch.unpackLimit > format.attach > format.cc > format.headers > format.numbered > format.pretty > format.signature > format.signoff > format.subjectprefix > format.suffix > format.thread > format.to > gc. > gc.aggressiveWindow > gc.auto > gc.autopacklimit > gc.packrefs > gc.pruneexpire > gc.reflogexpire > gc.reflogexpireunreachable > gc.rerereresolved > gc.rerereunresolved > gitcvs.allbinary > gitcvs.commitmsgannotation > gitcvs.dbTableNamePrefix > gitcvs.dbdriver > gitcvs.dbname > gitcvs.dbpass > gitcvs.dbuser > gitcvs.enabled > gitcvs.logfile > gitcvs.usecrlfattr > guitool. > gui.blamehistoryctx > gui.commitmsgwidth > gui.copyblamethreshold > gui.diffcontext > gui.encoding > gui.fastcopyblame > gui.matchtrackingbranch > gui.newbranchtemplate > gui.pruneduringfetch > gui.spellingdictionary > gui.trustmtime > help.autocorrect > help.browser > help.format > http.lowSpeedLimit > http.lowSpeedTime > http.maxRequests > http.minSessions > http.noEPSV > http.postBuffer > http.proxy > http.sslCAInfo > http.sslCAPath > http.sslCert > http.sslCertPasswordProtected > http.sslKey > http.sslVerify > http.useragent > i18n.commitEncoding > i18n.logOutputEncoding > imap.authMethod > imap.folder > imap.host > imap.pass > imap.port > imap.preformattedHTML > imap.sslverify > imap.tunnel > imap.user > init.templatedir > instaweb.browser > instaweb.httpd > instaweb.local > instaweb.modulepath > instaweb.port > interactive.singlekey > log.date > log.decorate > log.showroot > mailmap.file > man. > man.viewer > merge. > merge.conflictstyle > merge.log > merge.renameLimit > merge.renormalize > merge.stat > merge.tool > merge.verbosity > mergetool. > mergetool.keepBackup > mergetool.keepTemporaries > mergetool.prompt > notes.displayRef > notes.rewrite. > notes.rewrite.amend > notes.rewrite.rebase > notes.rewriteMode > notes.rewriteRef > pack.compression > pack.deltaCacheLimit > pack.deltaCacheSize > pack.depth > pack.indexVersion > pack.packSizeLimit > pack.threads > pack.window > pack.windowMemory > pager. > pretty. > pull.octopus > pull.twohead > push.default > rebase.autosquash > rebase.stat > receive.autogc > receive.denyCurrentBranch > receive.denyDeleteCurrent > receive.denyDeletes > receive.denyNonFastForwards > receive.fsckObjects > receive.unpackLimit > receive.updateserverinfo > remotes. > repack.usedeltabaseoffset > rerere.autoupdate > rerere.enabled > sendemail. > sendemail.aliasesfile > sendemail.aliasfiletype > sendemail.bcc > sendemail.cc > sendemail.cccmd > sendemail.chainreplyto > sendemail.confirm > sendemail.envelopesender > sendemail.from > sendemail.identity > sendemail.multiedit > sendemail.signedoffbycc > sendemail.smtpdomain > sendemail.smtpencryption > sendemail.smtppass > sendemail.smtpserver > sendemail.smtpserveroption > sendemail.smtpserverport > sendemail.smtpuser > sendemail.suppresscc > sendemail.suppressfrom > sendemail.thread > sendemail.to > sendemail.validate > showbranch.default > status.relativePaths > status.showUntrackedFiles > status.submodulesummary > submodule. > tar.umask > transfer.unpackLimit > url. > user.email > user.name > user.signingkey > web.browser > branch. remote. > " >} >_git_describe () >{ > case "$cur" in > --*) > __gitcomp " > --all --tags --contains --abbrev= --candidates= > --exact-match --debug --long --match --always > "; > return > ;; > esac; > __gitcomp_nl "$(__git_refs)" >} >_git_diff () >{ > __git_has_doubledash && return; > case "$cur" in > --*) > __gitcomp "--cached --staged --pickaxe-all --pickaxe-regex > --base --ours --theirs --no-index > $__git_diff_common_options > "; > return > ;; > esac; > __git_complete_revlist_file >} >_git_difftool () >{ > __git_has_doubledash && return; > case "$cur" in > --tool=*) > __gitcomp "$__git_mergetools_common kompare" "" "${cur##--tool=}"; > return > ;; > --*) > __gitcomp "--cached --staged --pickaxe-all --pickaxe-regex > --base --ours --theirs > --no-renames --diff-filter= --find-copies-harder > --relative --ignore-submodules > --tool="; > return > ;; > esac; > __git_complete_file >} >_git_fetch () >{ > case "$cur" in > --*) > __gitcomp "$__git_fetch_options"; > return > ;; > esac; > __git_complete_remote_or_refspec >} >_git_format_patch () >{ > case "$cur" in > --thread=*) > __gitcomp " > deep shallow > " "" "${cur##--thread=}"; > return > ;; > --*) > __gitcomp " > --stdout --attach --no-attach --thread --thread= > --output-directory > --numbered --start-number > --numbered-files > --keep-subject > --signoff --signature --no-signature > --in-reply-to= --cc= > --full-index --binary > --not --all > --cover-letter > --no-prefix --src-prefix= --dst-prefix= > --inline --suffix= --ignore-if-in-upstream > --subject-prefix= > "; > return > ;; > esac; > __git_complete_revlist >} >_git_fsck () >{ > case "$cur" in > --*) > __gitcomp " > --tags --root --unreachable --cache --no-reflogs --full > --strict --verbose --lost-found > "; > return > ;; > esac; > COMPREPLY=() >} >_git_gc () >{ > case "$cur" in > --*) > __gitcomp "--prune --aggressive"; > return > ;; > esac; > COMPREPLY=() >} >_git_gitk () >{ > _gitk >} >_git_grep () >{ > __git_has_doubledash && return; > case "$cur" in > --*) > __gitcomp " > --cached > --text --ignore-case --word-regexp --invert-match > --full-name --line-number > --extended-regexp --basic-regexp --fixed-strings > --perl-regexp > --files-with-matches --name-only > --files-without-match > --max-depth > --count > --and --or --not --all-match > "; > return > ;; > esac; > case "$cword,$prev" in > 2,* | *,-*) > if test -r tags; then > __gitcomp_nl "$(__git_match_ctag "$cur" tags)"; > return; > fi > ;; > esac; > __gitcomp_nl "$(__git_refs)" >} >_git_help () >{ > case "$cur" in > --*) > __gitcomp "--all --info --man --web"; > return > ;; > esac; > __git_compute_all_commands; > __gitcomp "$__git_all_commands $(__git_aliases) > attributes cli core-tutorial cvs-migration > diffcore gitk glossary hooks ignore modules > namespaces repository-layout tutorial tutorial-2 > workflows > " >} >_git_init () >{ > case "$cur" in > --shared=*) > __gitcomp " > false true umask group all world everybody > " "" "${cur##--shared=}"; > return > ;; > --*) > __gitcomp "--quiet --bare --template= --shared --shared="; > return > ;; > esac; > COMPREPLY=() >} >_git_log () >{ > __git_has_doubledash && return; > local g="$(git rev-parse --git-dir 2>/dev/null)"; > local merge=""; > if [ -f "$g/MERGE_HEAD" ]; then > merge="--merge"; > fi; > case "$cur" in > --pretty=* | --format=*) > __gitcomp "$__git_log_pretty_formats $(__git_pretty_aliases) > " "" "${cur#*=}"; > return > ;; > --date=*) > __gitcomp "$__git_log_date_formats" "" "${cur##--date=}"; > return > ;; > --decorate=*) > __gitcomp "long short" "" "${cur##--decorate=}"; > return > ;; > --*) > __gitcomp " > $__git_log_common_options > $__git_log_shortlog_options > $__git_log_gitk_options > --root --topo-order --date-order --reverse > --follow --full-diff > --abbrev-commit --abbrev= > --relative-date --date= > --pretty= --format= --oneline > --cherry-pick > --graph > --decorate --decorate= > --walk-reflogs > --parents --children > $merge > $__git_diff_common_options > --pickaxe-all --pickaxe-regex > "; > return > ;; > esac; > __git_complete_revlist >} >_git_ls_files () >{ > __git_has_doubledash && return; > case "$cur" in > --*) > __gitcomp "--cached --deleted --modified --others --ignored > --stage --directory --no-empty-directory --unmerged > --killed --exclude= --exclude-from= > --exclude-per-directory= --exclude-standard > --error-unmatch --with-tree= --full-name > --abbrev --ignored --exclude-per-directory > "; > return > ;; > esac; > COMPREPLY=() >} >_git_ls_remote () >{ > __gitcomp_nl "$(__git_remotes)" >} >_git_ls_tree () >{ > __git_complete_file >} >_git_merge () >{ > __git_complete_strategy && return; > case "$cur" in > --*) > __gitcomp "$__git_merge_options"; > return > ;; > esac; > __gitcomp_nl "$(__git_refs)" >} >_git_merge_base () >{ > __gitcomp_nl "$(__git_refs)" >} >_git_mergetool () >{ > case "$cur" in > --tool=*) > __gitcomp "$__git_mergetools_common tortoisemerge" "" "${cur##--tool=}"; > return > ;; > --*) > __gitcomp "--tool="; > return > ;; > esac; > COMPREPLY=() >} >_git_mv () >{ > case "$cur" in > --*) > __gitcomp "--dry-run"; > return > ;; > esac; > COMPREPLY=() >} >_git_name_rev () >{ > __gitcomp "--tags --all --stdin" >} >_git_notes () >{ > local subcommands='add append copy edit list prune remove show'; > local subcommand="$(__git_find_on_cmdline "$subcommands")"; > case "$subcommand,$cur" in > ,--*) > __gitcomp '--ref' > ;; > ,*) > case "${words[cword-1]}" in > --ref) > __gitcomp_nl "$(__git_refs)" > ;; > *) > __gitcomp "$subcommands --ref" > ;; > esac > ;; > add,--reuse-message=* | append,--reuse-message=* | add,--reedit-message=* | append,--reedit-message=*) > __gitcomp_nl "$(__git_refs)" "" "${cur#*=}" > ;; > add,--* | append,--*) > __gitcomp '--file= --message= --reedit-message= > --reuse-message=' > ;; > copy,--*) > __gitcomp '--stdin' > ;; > prune,--*) > __gitcomp '--dry-run --verbose' > ;; > prune,*) > > ;; > *) > case "${words[cword-1]}" in > -m | -F) > > ;; > *) > __gitcomp_nl "$(__git_refs)" > ;; > esac > ;; > esac >} >_git_pull () >{ > __git_complete_strategy && return; > case "$cur" in > --*) > __gitcomp " > --rebase --no-rebase > $__git_merge_options > $__git_fetch_options > "; > return > ;; > esac; > __git_complete_remote_or_refspec >} >_git_push () >{ > case "$prev" in > --repo) > __gitcomp_nl "$(__git_remotes)"; > return > ;; > esac; > case "$cur" in > --repo=*) > __gitcomp_nl "$(__git_remotes)" "" "${cur##--repo=}"; > return > ;; > --*) > __gitcomp " > --all --mirror --tags --dry-run --force --verbose > --receive-pack= --repo= --set-upstream > "; > return > ;; > esac; > __git_complete_remote_or_refspec >} >_git_rebase () >{ > local dir="$(__gitdir)"; > if [ -d "$dir"/rebase-apply ] || [ -d "$dir"/rebase-merge ]; then > __gitcomp "--continue --skip --abort"; > return; > fi; > __git_complete_strategy && return; > case "$cur" in > --whitespace=*) > __gitcomp "$__git_whitespacelist" "" "${cur##--whitespace=}"; > return > ;; > --*) > __gitcomp " > --onto --merge --strategy --interactive > --preserve-merges --stat --no-stat > --committer-date-is-author-date --ignore-date > --ignore-whitespace --whitespace= > --autosquash > "; > return > ;; > esac; > __gitcomp_nl "$(__git_refs)" >} >_git_reflog () >{ > local subcommands="show delete expire"; > local subcommand="$(__git_find_on_cmdline "$subcommands")"; > if [ -z "$subcommand" ]; then > __gitcomp "$subcommands"; > else > __gitcomp_nl "$(__git_refs)"; > fi >} >_git_remote () >{ > local subcommands="add rename rm set-head set-branches set-url show prune update"; > local subcommand="$(__git_find_on_cmdline "$subcommands")"; > if [ -z "$subcommand" ]; then > __gitcomp "$subcommands"; > return; > fi; > case "$subcommand" in > rename | rm | set-url | show | prune) > __gitcomp_nl "$(__git_remotes)" > ;; > set-head | set-branches) > __git_complete_remote_or_refspec > ;; > update) > local i c='' IFS=' >'; > for i in $(git --git-dir="$(__gitdir)" config --get-regexp "remotes\..*" 2>/dev/null); > do > i="${i#remotes.}"; > c="$c ${i/ */}"; > done; > __gitcomp "$c" > ;; > *) > COMPREPLY=() > ;; > esac >} >_git_replace () >{ > __gitcomp_nl "$(__git_refs)" >} >_git_reset () >{ > __git_has_doubledash && return; > case "$cur" in > --*) > __gitcomp "--merge --mixed --hard --soft --patch"; > return > ;; > esac; > __gitcomp_nl "$(__git_refs)" >} >_git_revert () >{ > case "$cur" in > --*) > __gitcomp "--edit --mainline --no-edit --no-commit --signoff"; > return > ;; > esac; > __gitcomp_nl "$(__git_refs)" >} >_git_rm () >{ > __git_has_doubledash && return; > case "$cur" in > --*) > __gitcomp "--cached --dry-run --ignore-unmatch --quiet"; > return > ;; > esac; > COMPREPLY=() >} >_git_send_email () >{ > case "$cur" in > --confirm=*) > __gitcomp " > $__git_send_email_confirm_options > " "" "${cur##--confirm=}"; > return > ;; > --suppress-cc=*) > __gitcomp " > $__git_send_email_suppresscc_options > " "" "${cur##--suppress-cc=}"; > return > ;; > --smtp-encryption=*) > __gitcomp "ssl tls" "" "${cur##--smtp-encryption=}"; > return > ;; > --*) > __gitcomp "--annotate --bcc --cc --cc-cmd --chain-reply-to > --compose --confirm= --dry-run --envelope-sender > --from --identity > --in-reply-to --no-chain-reply-to --no-signed-off-by-cc > --no-suppress-from --no-thread --quiet > --signed-off-by-cc --smtp-pass --smtp-server > --smtp-server-port --smtp-encryption= --smtp-user > --subject --suppress-cc= --suppress-from --thread --to > --validate --no-validate"; > return > ;; > esac; > COMPREPLY=() >} >_git_shortlog () >{ > __git_has_doubledash && return; > case "$cur" in > --*) > __gitcomp " > $__git_log_common_options > $__git_log_shortlog_options > --numbered --summary > "; > return > ;; > esac; > __git_complete_revlist >} >_git_show () >{ > __git_has_doubledash && return; > case "$cur" in > --pretty=* | --format=*) > __gitcomp "$__git_log_pretty_formats $(__git_pretty_aliases) > " "" "${cur#*=}"; > return > ;; > --*) > __gitcomp "--pretty= --format= --abbrev-commit --oneline > $__git_diff_common_options > "; > return > ;; > esac; > __git_complete_file >} >_git_show_branch () >{ > case "$cur" in > --*) > __gitcomp " > --all --remotes --topo-order --current --more= > --list --independent --merge-base --no-name > --color --no-color > --sha1-name --sparse --topics --reflog > "; > return > ;; > esac; > __git_complete_revlist >} >_git_stage () >{ > _git_add >} >_git_stash () >{ > local save_opts='--keep-index --no-keep-index --quiet --patch'; > local subcommands='save list show apply clear drop pop create branch'; > local subcommand="$(__git_find_on_cmdline "$subcommands")"; > if [ -z "$subcommand" ]; then > case "$cur" in > --*) > __gitcomp "$save_opts" > ;; > *) > if [ -z "$(__git_find_on_cmdline "$save_opts")" ]; then > __gitcomp "$subcommands"; > else > COMPREPLY=(); > fi > ;; > esac; > else > case "$subcommand,$cur" in > save,--*) > __gitcomp "$save_opts" > ;; > apply,--* | pop,--*) > __gitcomp "--index --quiet" > ;; > show,--* | drop,--* | branch,--*) > COMPREPLY=() > ;; > show,* | apply,* | drop,* | pop,* | branch,*) > __gitcomp_nl "$(git --git-dir="$(__gitdir)" stash list | sed -n -e 's/:.*//p')" > ;; > *) > COMPREPLY=() > ;; > esac; > fi >} >_git_submodule () >{ > __git_has_doubledash && return; > local subcommands="add status init update summary foreach sync"; > if [ -z "$(__git_find_on_cmdline "$subcommands")" ]; then > case "$cur" in > --*) > __gitcomp "--quiet --cached" > ;; > *) > __gitcomp "$subcommands" > ;; > esac; > return; > fi >} >_git_svn () >{ > local subcommands=" > init fetch clone rebase dcommit log find-rev > set-tree commit-diff info create-ignore propget > proplist show-ignore show-externals branch tag blame > migrate mkdirs reset gc > "; > local subcommand="$(__git_find_on_cmdline "$subcommands")"; > if [ -z "$subcommand" ]; then > __gitcomp "$subcommands"; > else > local remote_opts="--username= --config-dir= --no-auth-cache"; > local fc_opts=" > --follow-parent --authors-file= --repack= > --no-metadata --use-svm-props --use-svnsync-props > --log-window-size= --no-checkout --quiet > --repack-flags --use-log-author --localtime > --ignore-paths= $remote_opts > "; > local init_opts=" > --template= --shared= --trunk= --tags= > --branches= --stdlayout --minimize-url > --no-metadata --use-svm-props --use-svnsync-props > --rewrite-root= --prefix= --use-log-author > --add-author-from $remote_opts > "; > local cmt_opts=" > --edit --rmdir --find-copies-harder --copy-similarity= > "; > case "$subcommand,$cur" in > fetch,--*) > __gitcomp "--revision= --fetch-all $fc_opts" > ;; > clone,--*) > __gitcomp "--revision= $fc_opts $init_opts" > ;; > init,--*) > __gitcomp "$init_opts" > ;; > dcommit,--*) > __gitcomp " > --merge --strategy= --verbose --dry-run > --fetch-all --no-rebase --commit-url > --revision --interactive $cmt_opts $fc_opts > " > ;; > set-tree,--*) > __gitcomp "--stdin $cmt_opts $fc_opts" > ;; > create-ignore,--* | propget,--* | proplist,--* | show-ignore,--* | show-externals,--* | mkdirs,--*) > __gitcomp "--revision=" > ;; > log,--*) > __gitcomp " > --limit= --revision= --verbose --incremental > --oneline --show-commit --non-recursive > --authors-file= --color > " > ;; > rebase,--*) > __gitcomp " > --merge --verbose --strategy= --local > --fetch-all --dry-run $fc_opts > " > ;; > commit-diff,--*) > __gitcomp "--message= --file= --revision= $cmt_opts" > ;; > info,--*) > __gitcomp "--url" > ;; > branch,--*) > __gitcomp "--dry-run --message --tag" > ;; > tag,--*) > __gitcomp "--dry-run --message" > ;; > blame,--*) > __gitcomp "--git-format" > ;; > migrate,--*) > __gitcomp " > --config-dir= --ignore-paths= --minimize > --no-auth-cache --username= > " > ;; > reset,--*) > __gitcomp "--revision= --parent" > ;; > *) > COMPREPLY=() > ;; > esac; > fi >} >_git_tag () >{ > local i c=1 f=0; > while [ $c -lt $cword ]; do > i="${words[c]}"; > case "$i" in > -d | -v) > __gitcomp_nl "$(__git_tags)"; > return > ;; > -f) > f=1 > ;; > esac; > ((c++)); > done; > case "$prev" in > -m | -F) > COMPREPLY=() > ;; > -* | tag) > if [ $f = 1 ]; then > __gitcomp_nl "$(__git_tags)"; > else > COMPREPLY=(); > fi > ;; > *) > __gitcomp_nl "$(__git_refs)" > ;; > esac >} >_git_whatchanged () >{ > _git_log >} >_gitk () >{ > if [[ -n ${ZSH_VERSION-} ]]; then > emulate -L bash; > setopt KSH_TYPESET; > typeset -h words; > typeset -h IFS; > fi; > local cur words cword prev; > _get_comp_words_by_ref -n =: cur words cword prev; > __git_has_doubledash && return; > local g="$(__gitdir)"; > local merge=""; > if [ -f "$g/MERGE_HEAD" ]; then > merge="--merge"; > fi; > case "$cur" in > --*) > __gitcomp " > $__git_log_common_options > $__git_log_gitk_options > $merge > "; > return > ;; > esac; > __git_complete_revlist >} >_grub_editenv () >{ > local cur prev; > COMPREPLY=(); > cur=`_get_cword`; > prev=${COMP_WORDS[COMP_CWORD-1]}; > case "$prev" in > create | list | set | unset) > COMPREPLY=(""); > return > ;; > esac; > __grubcomp "$(__grub_get_options_from_help) > create list set unset" >} >_grub_install () >{ > local cur prev last split=false; > COMPREPLY=(); > cur=`_get_cword`; > prev=${COMP_WORDS[COMP_CWORD-1]}; > last=$(__grub_get_last_option); > _split_longopt && split=true; > case "$prev" in > --boot-directory) > _filedir -d; > return > ;; > --disk-module) > __grubcomp "biosdisk ata"; > return > ;; > esac; > $split && return 0; > if [[ "$cur" == -* ]]; then > __grubcomp "$(__grub_get_options_from_help)"; > else > case "$last" in > --modules) > __grub_list_modules; > return > ;; > esac; > _filedir; > fi >} >_grub_mkconfig () >{ > local cur prev; > COMPREPLY=(); > cur=`_get_cword`; > if [[ "$cur" == -* ]]; then > __grubcomp "$(__grub_get_options_from_help)"; > else > _filedir; > fi >} >_grub_mkfont () >{ > local cur; > COMPREPLY=(); > cur=`_get_cword`; > if [[ "$cur" == -* ]]; then > __grubcomp "$(__grub_get_options_from_help)"; > else > _filedir; > fi >} >_grub_mkimage () >{ > local cur prev split=false; > COMPREPLY=(); > cur=`_get_cword`; > prev=${COMP_WORDS[COMP_CWORD-1]}; > _split_longopt && split=true; > case "$prev" in > -d | --directory | -p | --prefix) > _filedir -d; > return > ;; > -O | --format) > local prog=${COMP_WORDS[0]}; > __grubcomp "$(LC_ALL=C $prog --help | awk -F ":" '/available formats/ { print $2 }' | sed 's/, / /g')"; > return > ;; > esac; > $split && return 0; > if [[ "$cur" == -* ]]; then > __grubcomp "$(__grub_get_options_from_help)"; > else > _filedir; > fi >} >_grub_mkpasswd_pbkdf2 () >{ > local cur; > COMPREPLY=(); > cur=`_get_cword`; > if [[ "$cur" == -* ]]; then > __grubcomp "$(__grub_get_options_from_help)"; > else > _filedir; > fi >} >_grub_mkrescue () >{ > local cur prev last; > COMPREPLY=(); > cur=`_get_cword`; > prev=${COMP_WORDS[COMP_CWORD-1]}; > last=$(__grub_get_last_option); > if [[ "$cur" == -* ]]; then > __grubcomp "$(__grub_get_options_from_help)"; > else > case "$last" in > --modules) > __grub_list_modules; > return > ;; > esac; > _filedir; > fi >} >_grub_probe () >{ > local cur prev split=false; > COMPREPLY=(); > cur=`_get_cword`; > prev=${COMP_WORDS[COMP_CWORD-1]}; > _split_longopt && split=true; > case "$prev" in > -t | --target) > local prog=${COMP_WORDS[0]}; > __grubcomp "$(LC_ALL=C $prog --help | awk -F "[()]" '/--target=/ { print $2 }' | sed 's/|/ /g')"; > return > ;; > esac; > $split && return 0; > if [[ "$cur" == -* ]]; then > __grubcomp "$(__grub_get_options_from_help)"; > else > _filedir; > fi >} >_grub_script_check () >{ > local cur; > COMPREPLY=(); > cur=`_get_cword`; > if [[ "$cur" == -* ]]; then > __grubcomp "$(__grub_get_options_from_help)"; > else > _filedir; > fi >} >_grub_set_entry () >{ > local cur prev split=false; > COMPREPLY=(); > cur=`_get_cword`; > prev=${COMP_WORDS[COMP_CWORD-1]}; > _split_longopt && split=true; > case "$prev" in > --boot-directory) > _filedir -d; > return > ;; > esac; > $split && return 0; > if [[ "$cur" == -* ]]; then > __grubcomp "$(__grub_get_options_from_help)"; > else > __grub_list_menuentries; > fi >} >_grub_setup () >{ > local cur prev split=false; > COMPREPLY=(); > cur=`_get_cword`; > prev=${COMP_WORDS[COMP_CWORD-1]}; > _split_longopt && split=true; > case "$prev" in > -d | --directory) > _filedir -d; > return > ;; > esac; > $split && return 0; > if [[ "$cur" == -* ]]; then > __grubcomp "$(__grub_get_options_from_help)"; > else > _filedir; > fi >} >_have () >{ > PATH=$PATH:/usr/sbin:/sbin:/usr/local/sbin type $1 &>/dev/null >} >_hg () >{ > local cur prev cmd cmd_index opts i; > local global_args='--cwd|-R|--repository'; > local hg="$1"; > local canonical=0; > COMPREPLY=(); > cur="$2"; > prev="$3"; > for ((i=1; $i<=$COMP_CWORD; i++)) > do > if [[ ${COMP_WORDS[i]} != -* ]]; then > if [[ ${COMP_WORDS[i-1]} != @($global_args) ]]; then > cmd="${COMP_WORDS[i]}"; > cmd_index=$i; > break; > fi; > fi; > done; > if [[ "$cur" == -* ]]; then > if [ "$(type -t "_hg_opt_$cmd")" = function ] && "_hg_opt_$cmd"; then > return; > fi; > opts=$(_hg_cmd debugcomplete --options "$cmd"); > COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$opts' -- "$cur")); > return; > fi; > case "$prev" in > -R | --repository) > _hg_paths; > _hg_repos; > return > ;; > --cwd) > return > ;; > esac; > if [ -z "$cmd" ] || [ $COMP_CWORD -eq $i ]; then > _hg_commands; > return; > fi; > local help; > if _hg_command_specific; then > return; > fi; > help=$(_hg_cmd help "$cmd"); > if [ $? -ne 0 ]; then > return; > fi; > cmd=${help#hg }; > cmd=${cmd%%[' >']*}; > canonical=1; > _hg_command_specific >} >_hg_bookmarks () >{ > local bookmarks="$(_hg_cmd bookmarks --quiet )"; > local IFS=' >'; > COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$bookmarks' -- "$cur")) >} >_hg_branches () >{ > local branches="$(_hg_cmd branches -q)"; > local IFS=' >'; > COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$branches' -- "$cur")) >} >_hg_cmd () >{ > HGPLAIN=1 "$hg" "$@" 2> /dev/null >} >_hg_cmd_bisect () >{ > local i subcmd; > for ((i=cmd_index+1; i<=COMP_CWORD; i++)) > do > if [[ ${COMP_WORDS[i]} != -* ]]; then > if [[ ${COMP_WORDS[i-1]} != @($global_args) ]]; then > subcmd="${COMP_WORDS[i]}"; > break; > fi; > fi; > done; > if [ -z "$subcmd" ] || [ $COMP_CWORD -eq $i ] || [ "$subcmd" = help ]; then > COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W 'bad good help init next reset' -- "$cur")); > return; > fi; > case "$subcmd" in > good | bad) > _hg_labels > ;; > esac; > return >} >_hg_cmd_bookmarks () >{ > if [[ "$prev" = @(-d|--delete|-m|--rename) ]]; then > _hg_bookmarks; > return; > fi >} >_hg_cmd_email () >{ > case "$prev" in > -c | --cc | -t | --to | -f | --from | --bcc) > if [ "$(type -t _hg_emails)" = function ]; then > local arg=to; > if [[ "$prev" == @(-f|--from) ]]; then > arg=from; > fi; > local addresses=$(_hg_emails $arg); > COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$addresses' -- "$cur")); > fi; > return > ;; > -m | --mbox) > return > ;; > -s | --subject) > return > ;; > esac; > _hg_labels; > return >} >_hg_cmd_qclone () >{ > local count=$(_hg_count_non_option); > if [ $count = 1 ]; then > _hg_paths; > fi; > _hg_repos >} >_hg_cmd_qcommit () >{ > local root=$(_hg_cmd root); > local files=$(cd "$root/.hg/patches" && _hg_cmd status -nmar); > COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$files' -- "$cur")) >} >_hg_cmd_qdelete () >{ > local qcmd=qunapplied; > if [[ "$prev" = @(-r|--rev) ]]; then > qcmd=qapplied; > fi; > _hg_ext_mq_patchlist $qcmd >} >_hg_cmd_qfinish () >{ > if [[ "$prev" = @(-a|--applied) ]]; then > return; > fi; > _hg_ext_mq_patchlist qapplied >} >_hg_cmd_qfold () >{ > _hg_ext_mq_patchlist qunapplied >} >_hg_cmd_qgoto () >{ > if [[ "$prev" = @(-n|--name) ]]; then > _hg_ext_mq_queues; > return; > fi; > _hg_ext_mq_patchlist qseries >} >_hg_cmd_qguard () >{ > local prefix=''; > if [[ "$cur" == +* ]]; then > prefix=+; > else > if [[ "$cur" == -* ]]; then > prefix=-; > fi; > fi; > local ncur=${cur#[-+]}; > if ! [ "$prefix" ]; then > _hg_ext_mq_patchlist qseries; > return; > fi; > local guards=$(_hg_ext_mq_guards); > COMPREPLY=(${COMPREPLY[@]:-} $(compgen -P $prefix -W '$guards' -- "$ncur")) >} >_hg_cmd_qheader () >{ > _hg_ext_mq_patchlist qseries >} >_hg_cmd_qpop () >{ > if [[ "$prev" = @(-n|--name) ]]; then > _hg_ext_mq_queues; > return; > fi; > _hg_ext_mq_patchlist qapplied >} >_hg_cmd_qpush () >{ > if [[ "$prev" = @(-n|--name) ]]; then > _hg_ext_mq_queues; > return; > fi; > _hg_ext_mq_patchlist qunapplied >} >_hg_cmd_qqueue () >{ > local q; > local queues; > local opts="--list --create --rename --delete --purge"; > queues=$( _hg_cmd qqueue --quiet ); > COMPREPLY=($( compgen -W "${opts} ${queues}" "${cur}" )) >} >_hg_cmd_qrename () >{ > _hg_ext_mq_patchlist qseries >} >_hg_cmd_qsave () >{ > if [[ "$prev" = @(-n|--name) ]]; then > _hg_ext_mq_queues; > return; > fi >} >_hg_cmd_qselect () >{ > local guards=$(_hg_ext_mq_guards); > COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$guards' -- "$cur")) >} >_hg_cmd_shelve () >{ > _hg_status "mard" >} >_hg_cmd_sign () >{ > _hg_labels >} >_hg_cmd_strip () >{ > _hg_labels >} >_hg_cmd_transplant () >{ > case "$prev" in > -s | --source) > _hg_paths; > _hg_repos; > return > ;; > --filter) > return > ;; > esac; > _hg_labels; > return >} >_hg_cmd_unshelve () >{ > _hg_shelves >} >_hg_command_specific () >{ > if [ "$(type -t "_hg_cmd_$cmd")" = function ]; then > "_hg_cmd_$cmd"; > return 0; > fi; > if [ "$cmd" != status ] && [ "$prev" = -r ] || [ "$prev" == --rev ]; then > if [ $canonical = 1 ]; then > _hg_labels; > return 0; > else > if [[ status != "$cmd"* ]]; then > _hg_labels; > return 0; > else > return 1; > fi; > fi; > fi; > case "$cmd" in > help) > _hg_commands > ;; > export) > if _hg_ext_mq_patchlist qapplied && [ "${COMPREPLY[*]}" ]; then > return 0; > fi; > _hg_labels > ;; > manifest | update) > _hg_labels > ;; > pull | push | outgoing | incoming) > _hg_paths; > _hg_repos > ;; > paths) > _hg_paths > ;; > add) > _hg_status "u" > ;; > merge) > _hg_labels > ;; > commit | record) > _hg_status "mar" > ;; > remove) > _hg_status "d" > ;; > forget) > _hg_status "a" > ;; > diff) > _hg_status "mar" > ;; > revert) > _hg_status "mard" > ;; > clone) > local count=$(_hg_count_non_option); > if [ $count = 1 ]; then > _hg_paths; > fi; > _hg_repos > ;; > debugindex | debugindexdot) > COMPREPLY=(${COMPREPLY[@]:-} $(compgen -f -X "!*.i" -- "$cur")) > ;; > debugdata) > COMPREPLY=(${COMPREPLY[@]:-} $(compgen -f -X "!*.d" -- "$cur")) > ;; > *) > return 1 > ;; > esac; > return 0 >} >_hg_commands () >{ > local commands; > commands="$(HGPLAINEXCEPT=alias _hg_cmd debugcomplete "$cur")" || commands=""; > COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$commands' -- "$cur")) >} >_hg_count_non_option () >{ > local i count=0; > local filters="$1"; > for ((i=1; $i<=$COMP_CWORD; i++)) > do > if [[ "${COMP_WORDS[i]}" != -* ]]; then > if [[ ${COMP_WORDS[i-1]} == @($filters|$global_args) ]]; then > continue; > fi; > count=$(($count + 1)); > fi; > done; > echo $(($count - 1)) >} >_hg_ext_mq_guards () >{ > _hg_cmd qselect --series | sed -e 's/^.//' >} >_hg_ext_mq_patchlist () >{ > local patches; > patches=$(_hg_cmd $1); > if [ $? -eq 0 ] && [ "$patches" ]; then > COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$patches' -- "$cur")); > return 0; > fi; > return 1 >} >_hg_ext_mq_queues () >{ > local root=$(_hg_cmd root); > local n; > for n in $(cd "$root"/.hg && compgen -d -- "$cur"); > do > if [ "$n" != patches ] && [ -e "$root/.hg/$n/series" ]; then > COMPREPLY=(${COMPREPLY[@]:-} "$n"); > fi; > done >} >_hg_labels () >{ > _hg_tags; > _hg_branches; > _hg_bookmarks >} >_hg_opt_qguard () >{ > local i; > for ((i=cmd_index+1; i<=COMP_CWORD; i++)) > do > if [[ ${COMP_WORDS[i]} != -* ]]; then > if [[ ${COMP_WORDS[i-1]} != @($global_args) ]]; then > _hg_cmd_qguard; > return 0; > fi; > else > if [ "${COMP_WORDS[i]}" = -- ]; then > _hg_cmd_qguard; > return 0; > fi; > fi; > done; > return 1 >} >_hg_paths () >{ > local paths="$(_hg_cmd paths -q)"; > COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$paths' -- "$cur")) >} >_hg_repos () >{ > local i; > for i in $(compgen -d -- "$cur"); > do > test ! -d "$i"/.hg || COMPREPLY=(${COMPREPLY[@]:-} "$i"); > done >} >_hg_shelves () >{ > local shelves="$(_hg_cmd unshelve -l .)"; > local IFS=' >'; > COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$shelves' -- "$cur")) >} >_hg_status () >{ > local files="$(_hg_cmd status -n$1 .)"; > local IFS=' >'; > compopt -o filenames 2> /dev/null; > COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$files' -- "$cur")) >} >_hg_tags () >{ > local tags="$(_hg_cmd tags -q)"; > local IFS=' >'; > COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$tags' -- "$cur")) >} >_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 -eq 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 () >{ > COMPREPLY+=($( compgen -W "$( PATH="$PATH:/sbin" LC_ALL=C ifconfig -a | > 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; > 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=$( sed -ne 's/^[ \t]*[Hh][Oo][Ss][Tt]\([Nn][Aa][Mm][Ee]\)\{0,1\}['"$'\t '"']\{1,\}\([^#*?]*\)\(#.*\)\{0,1\}$/\2/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 '{ 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"; > return 0 >} >_loginctl () >{ > local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}; > local verb comps; > local -A OPTS=([STANDALONE]='--all -a --help -h --no-pager --privileged -P --version' [ARG]='--host -H --kill-who --property -p --signal -s'); > if __contains_word "$prev" ${OPTS[ARG]}; then > case $prev in > --signal | -s) > comps=$(compgen -A signal) > ;; > --kill-who) > comps='all leader' > ;; > --host | -H) > comps=$(compgen -A hostname) > ;; > --property | -p) > comps='' > ;; > esac; > COMPREPLY=($(compgen -W '$comps' -- "$cur")); > return 0; > fi; > if [[ "$cur" = -* ]]; then > COMPREPLY=($(compgen -W '${OPTS[*]}' -- "$cur")); > return 0; > fi; > local -A VERBS=([SESSIONS]='session-status show-session activate lock-session unlock-session terminate-session kill-session' [USERS]='user-status show-user enable-linger disable-linger terminate-user kill-user' [SEATS]='seat-status show-seat terminate-seat' [STANDALONE]='list-sessions list-users list-seats flush-devices' [ATTACH]='attach'); > for ((i=0; $i <= $COMP_CWORD; i++)) > do > if __contains_word "${COMP_WORDS[i]}" ${VERBS[*]} && ! __contains_word "${COMP_WORDS[i-1]}" ${OPTS[ARG}]}; then > verb=${COMP_WORDS[i]}; > break; > fi; > done; > if [[ -z $verb ]]; then > comps="${VERBS[*]}"; > else > if __contains_word "$verb" ${VERBS[SESSIONS]}; then > comps=$( __get_all_sessions ); > else > if __contains_word "$verb" ${VERBS[USERS]}; then > comps=$( __get_all_users ); > else > if __contains_word "$verb" ${VERBS[SEATS]}; then > comps=$( __get_all_seats ); > else > if __contains_word "$verb" ${VERBS[STANDALONE]}; then > comps=''; > else > if __contains_word "$verb" ${VERBS[ATTACH]}; then > if [[ $prev = $verb ]]; then > comps=$( __get_all_seats ); > else > comps=$(compgen -A file -- "$cur" ); > compopt -o filenames; > fi; > fi; > fi; > fi; > fi; > fi; > fi; > COMPREPLY=($(compgen -W '$comps' -- "$cur")); > return 0 >} >_longopt () >{ > local cur prev words cword split; > _init_completion -s || return; > case "${prev,,}" in > --help | --usage | --version) > return 0 > ;; > --*dir*) > _filedir -d; > return 0 > ;; > --*file* | --*path*) > _filedir; > return 0 > ;; > --+([-a-z0-9_])) > local argtype=$( $1 --help 2>&1 | sed -ne "s|.*$prev\[\{0,1\}=[<[]\{0,1\}\([-A-Za-z0-9_]\{1,\}\).*|\1|p" ); > case ${argtype,,} in > *dir*) > _filedir -d; > return 0 > ;; > *file* | *path*) > _filedir; > return 0 > ;; > esac > ;; > esac; > $split && return 0; > if [[ "$cur" == -* ]]; then > COMPREPLY=($( compgen -W "$( $1 --help 2>&1 | 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 ]]; 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+=($( ifconfig -a 2>/dev/null | sed -ne "s/.*[[:space:]]HWaddr[[:space:]]\{1,\}\($re\)[[:space:]]*$/\1/p" -ne "s/^[[:space:]]\{1,\}ether[[:space:]]\{1,\}\($re\)[[:space:]]*$/\1/p" )); > COMPREPLY+=($( arp -an 2>/dev/null | sed -ne "s/.*[[:space:]]\($re\)[[:space:]].*/\1/p" -ne "s/.*[[:space:]]\($re\)[[:space:]]*$/\1/p" )); > COMPREPLY+=($( 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 >} >_mock () >{ > COMPREPLY=(); > local cur prev cword cfgdir=/etc/mock; > local -a words; > if declare -F _get_comp_words_by_ref &>/dev/null; then > _get_comp_words_by_ref cur prev words cword; > else > cur=$2 prev=$3 words=("${COMP_WORDS[@]}") cword=$COMP_CWORD; > fi; > local word count=0; > for word in "${words[@]}"; > do > [[ $count -eq $cword ]] && break; > if [[ "$word" == --configdir ]]; then > cfgdir="${words[((count+1))]}"; > else > if [[ "$word" == --configdir=* ]]; then > cfgdir=${word/*=/}; > fi; > fi; > count=$((++count)); > done; > local split=false; > declare -F _split_longopt &>/dev/null && _split_longopt && split=true; > case "$prev" in > -h | --help | --copyin | --copyout | --arch | -D | --define | --with | --without | --uniqueext | --rpmbuild_timeout | --sources | --cwd | --scm-option) > return 0 > ;; > -r | --root) > COMPREPLY=($( compgen -W "$( command ls $cfgdir 2>/dev/null | sed -ne 's/\.cfg$//p' )" -X site-defaults -- "$cur" )); > return 0 > ;; > --configdir | --resultdir) > COMPREPLY=($( compgen -d -- "$cur" )); > return 0 > ;; > --spec) > COMPREPLY=($( compgen -f -o plusdirs -X "!*.spec" -- "$cur" )); > return 0 > ;; > --target) > COMPREPLY=($( compgen -W "$( command rpm --showrc | sed -ne 's/^\s*compatible\s\s*archs\s*:\s*\(.*\)/\1/i p' )" -- "$cur" )); > return 0 > ;; > --enable-plugin | --disable-plugin) > COMPREPLY=($( compgen -W "$( $1 $prev=DOES_NOT_EXIST 2>&1 | sed -ne "s/[',]//g" -e 's/.*[[(]\([^])]*\)[])]/\1/p' )" -- "$cur" )); > return 0 > ;; > --scrub) > COMPREPLY=($( compgen -W "all chroot cache root-cache c-cache > yum-cache" -- "$cur" )); > return 0 > ;; > --install | install) > COMPREPLY=($( compgen -f -o plusdirs -X '!*.rpm' -X '*src.rpm' -- "$cur" )); > [[ $cur != */* && $cur != [.~]* ]] && declare -F _yum_list &>/dev/null && _yum_list all "$cur"; > return 0 > ;; > --remove | remove) > declare -F _yum_list &>/dev/null && _yum_list all "$cur"; > return 0 > ;; > esac; > $split && return 0; > if [[ "$cur" == -* ]]; then > COMPREPLY=($( compgen -W "--version --help --rebuild --buildsrpm > --shell --chroot --clean --scrub --init --installdeps --install > --update --remove --orphanskill --copyin --copyout --root --offline > --no-clean --cleanup-after --no-cleanup-after --arch --target > --define --with --without --resultdir --uniqueext --configdir > --rpmbuild_timeout --unpriv --cwd --spec --sources --verbose > --quiet --trace --enable-plugin --disable-plugin > --print-root-path --scm-enable --scm-option" -- "$cur" )); > return 0; > fi; > COMPREPLY=($( compgen -f -o plusdirs -X '!*.@(?(no)src.r|s)pm' -- "$cur" )) >} >_modules () >{ > local modpath; > modpath=/lib/modules/$1; > COMPREPLY=($( compgen -W "$( command ls -RL $modpath | sed -ne 's/^\(.*\)\.k\{0,1\}o\(\.gz\)\{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 > ;; > *) > "$( dequote "$cmd" )" ${2:---help} 2>&1 > ;; > esac > } | while read -r line; do > [[ $line == *([ ' '])-* ]] || 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 > ;; > *) > "$( 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 >} >_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" )) >} >_pkcon () >{ > local i c=1 command; > while [ $c -lt $COMP_CWORD ]; do > i="${COMP_WORDS[c]}"; > case "$i" in > --version | --help | --verbose | --nowait | -v | -n | -h | -?) > > ;; > *) > command="$i"; > break > ;; > esac; > c=$((++c)); > done; > if [ $c -eq $COMP_CWORD -a -z "$command" ]; then > case "${COMP_WORDS[COMP_CWORD]}" in > --*=*) > COMPREPLY=() > ;; > --*) > __pkconcomp " > --version > --filter > --verbose > --help > --nowait > " > ;; > -*) > __pkconcomp " > -v > -n > -h > -? > --version > --verbose > --help > --filter > --nowait > " > ;; > *) > __pkconcomp "$__pkcon_commandlist" > ;; > esac; > return; > fi; > case "$command" in > search) > _pkcon_search > ;; > *) > COMPREPLY=() > ;; > esac >} >_pkcon_search () >{ > local i c=1 command; > while [ $c -lt $COMP_CWORD ]; do > i="${COMP_WORDS[c]}"; > case "$i" in > name | details | group | file) > command="$i"; > break > ;; > esac; > c=$((++c)); > done; > if [ $c -eq $COMP_CWORD -a -z "$command" ]; then > __pkconcomp "name details group file"; > fi; > return >} >_pnames () >{ > COMPREPLY=($( compgen -X '<defunct>' -W '$( command ps axo command= | \ > sed -e "s/ .*//" -e "s:.*/::" -e "s/:$//" -e "s/^[[(-]//" \ > -e "s/[])]$//" | sort -u )' -- "$cur" )) >} >_python_django_completion () >{ > if [[ ${COMP_CWORD} -ge 2 ]]; then > PYTHON_EXE=$( basename -- ${COMP_WORDS[0]} ); > echo $PYTHON_EXE | egrep "python([2-9]\.[0-9])?" > /dev/null 2>&1; > if [[ $? == 0 ]]; then > PYTHON_SCRIPT=$( basename -- ${COMP_WORDS[1]} ); > echo $PYTHON_SCRIPT | egrep "manage\.py|django-admin(\.py)?" > /dev/null 2>&1; > if [[ $? == 0 ]]; then > COMPREPLY=($( COMP_WORDS="${COMP_WORDS[*]:1}" COMP_CWORD=$(( COMP_CWORD-1 )) DJANGO_AUTO_COMPLETE=1 ${COMP_WORDS[*]} )); > fi; > fi; > 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 readlink > /dev/null; then > readlink -f "$(type -P "$1")"; > else > type -P "$1"; > 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 >} >_rpmdev_archives () >{ > if [[ ${#@} -ne 0 ]]; then > local cur prev; > _rpmdev_curprev "$2" "$3"; > fi; > _filedir '@([rs]pm|deb|zip|?([ejtw])ar|tzo|[glx7]z|bz2|lzma|lrz|t@(bz?(2)|[glx]z)|cpio|arj|zoo|cab|rar|ace|lha)' >} >_rpmdev_bumpspec () >{ > COMPREPLY=(); > local i; > for i in ${COMP_WORDS[@]}; > do > [[ "$i" == -@(h|-help|v|-version) ]] && return 0; > done; > local cur prev; > _rpmdev_curprev "$2" "$3"; > [[ $prev == -@(c|-comment|u|-userstring) ]] && return 0; > if [[ "$cur" == -* ]]; then > COMPREPLY=($( compgen -W '--help --comment --userstring --rightmost > --verbose --version' -- "$cur" )); > else > _filedir spec; > fi >} >_rpmdev_curprev () >{ > if declare -F _get_comp_words_by_ref &>/dev/null; then > _get_comp_words_by_ref cur prev; > else > cur=$1 prev=$2; > fi >} >_rpmdev_diff () >{ > COMPREPLY=(); > local i; > for i in ${COMP_WORDS[@]}; > do > [[ "$i" == -@(h|-help|v|-version) ]] && return 0; > done; > local cur prev; > _rpmdev_curprev "$2" "$3"; > if [[ "$cur" == -* ]]; then > COMPREPLY=($( compgen -W '--contents --list --long-list --metadata > --help --version' -- "$cur" )); > return 0; > fi; > _rpmdev_archives >} >_rpmdev_extract () >{ > COMPREPLY=(); > local i; > for i in ${COMP_WORDS[@]}; > do > [[ "$i" == -@(h|v) ]] && return 0; > done; > local cur prev; > _rpmdev_curprev "$2" "$3"; > if [[ $prev == -C ]]; then > _filedir -d; > return 0; > fi; > if [[ "$cur" == -* ]]; then > COMPREPLY=($( compgen -W '-q -f -C -h -v' -- "$cur" )); > return 0; > fi; > _rpmdev_archives >} >_rpmdev_installed_packages () >{ > if declare -F _rpm_installed_packages &>/dev/null; then > _rpm_installed_packages; > else > if declare -F _xfunc &>/dev/null; then > _xfunc rpm _rpm_installed_packages; > fi; > fi >} >_rpmdev_newspec () >{ > COMPREPLY=(); > local i; > for i in ${COMP_WORDS[@]}; > do > [[ "$i" == -@(h|-help|v|-version) ]] && return 0; > done; > local cur prev; > _rpmdev_curprev "$2" "$3"; > case $prev in > -o | --output) > _filedir spec; > return 0 > ;; > -t | --type) > COMPREPLY=($( command ls /etc/rpmdevtools/spectemplate-*.spec 2>/dev/null )); > COMPREPLY=(${COMPREPLY[@]%.spec}); > COMPREPLY=(${COMPREPLY[@]#/etc/rpmdevtools/spectemplate-}); > COMPREPLY=($( compgen -W '${COMPREPLY[@]}' -- "$cur" )); > return 0 > ;; > -r | --rpm-version) > COMPREPLY=($( compgen -W '4.3 4.4 4.6 4.8' -- "$cur" )); > return 0 > ;; > esac; > if [[ "$cur" == -* ]]; then > COMPREPLY=($( compgen -W '--output --type --macros --rpm-version > --help --version' -- "$cur" )); > return 0; > fi; > _filedir spec >} >_rpmdev_rmdevelrpms () >{ > COMPREPLY=(); > local i; > for i in ${COMP_WORDS[@]}; > do > [[ "$i" == -@(h|-help|v|-version) ]] && return 0; > done; > local cur prev; > _rpmdev_curprev "$2" "$3"; > [[ $prev == --@(qf|queryformat) ]] && return 0; > COMPREPLY=($( compgen -W '--help --list-only --queryformat --yes > --version' -- "$cur" )) >} >_rpmdev_rpmfiles () >{ > if [[ ${#@} -ne 0 ]]; then > local cur prev; > _rpmdev_curprev "$2" "$3"; > fi; > _filedir '[rs]pm' >} >_rpmdev_setuptree () >{ > local cur prev; > _rpmdev_curprev "$2" "$3"; > if [[ "$cur" == -* ]]; then > COMPREPLY=($( compgen -W '-d' -- "$cur" )); > fi >} >_rpmdev_vercmp () >{ > COMPREPLY=(); > local i; > for i in ${COMP_WORDS[@]}; > do > [[ "$i" == -@(h|-help|u|-usage) ]] && return 0; > done; > local cur prev; > _rpmdev_curprev "$2" "$3"; > if [[ $cur == -* ]]; then > COMPREPLY=($( compgen -W '--help' -- "$cur" )); > fi >} >_rpminfo () >{ > COMPREPLY=(); > local i; > for i in ${COMP_WORDS[@]}; > do > [[ "$i" == -@(h|-help) ]] && return 0; > done; > local cur prev; > _rpmdev_curprev "$2" "$3"; > case $prev in > -o | --output) > _filedir; > return 0 > ;; > -T | --tmp-dir) > _filedir -d; > return 0 > ;; > esac; > if [[ "$cur" == -* ]]; then > COMPREPLY=($( compgen -W '--help --verbose --quiet -qq --installed > --executables --libraries --pic --no_pic > --pie --no_pie --rpath --rpath_odd --split > --test --output --tmp-dir' -- "$cur" )); > return 0; > fi; > [[ $cur != */* ]] && _rpmdev_installed_packages; > _rpmdev_rpmfiles >} >_rpmls () >{ > COMPREPLY=(); > local cur prev; > _rpmdev_curprev "$2" "$3"; > if [[ "$cur" == -* ]]; then > COMPREPLY=($( compgen -W '-l' -- "$cur" )); > return 0; > fi; > [[ $cur != */* ]] && _rpmdev_installed_packages; > _rpmdev_rpmfiles >} >_semanage () >{ > local command=${COMP_WORDS[1]}; > local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}; > local verb comps; > local -A VERBS=([LOGIN]='login' [USER]='user' [PORT]='port' [INTERFACE]='interface' [MODULE]='module' [NODE]='node' [FCONTEXT]='fcontext' [BOOLEAN]='boolean' [PERMISSIVE]='permissive' [DONTAUDIT]='dontaudit'); > if [ "$prev" = "-a" -a "$command" = "permissive" ]; then > COMPREPLY=($(compgen -W "$( __get_all_domains ) " -- "$cur")); > return 0; > fi; > if [ "$verb" = "" -a "$prev" = "semanage" ]; then > comps="${VERBS[*]}"; > else > if [ "$verb" = "" -a "$prev" = "-S" -o "$prev" = "--store" ]; then > COMPREPLY=($(compgen -W "$( __get_all_stores ) " -- "$cur")); > return 0; > else > if [ "$verb" = "" -a "$prev" = "-p" -o "$prev" = "--proto" ]; then > COMPREPLY=($(compgen -W "tcp udp" -- "$cur")); > return 0; > else > if [ "$verb" = "" -a "$prev" = "-r" -o "$prev" = "--roles" ]; then > COMPREPLY=($(compgen -W "$( __get_all_roles ) " -- "$cur")); > return 0; > else > if [ "$verb" = "" -a "$prev" = "-s" -o "$prev" = "--seuser" ]; then > COMPREPLY=($(compgen -W "$( __get_all_users ) " -- "$cur")); > return 0; > else > if [ "$verb" = "" -a "$prev" = "-f" -o "$prev" = "--ftype" ]; then > COMPREPLY=($(compgen -W "$( __get_all_ftypes ) " -- "$cur")); > return 0; > else > if [ "$verb" = "" -a "$prev" = "-t" -o "$prev" = "--types" ]; then > if [ "$command" = "port" ]; then > COMPREPLY=($(compgen -W "$( __get_all_port_types ) " -- "$cur")); > return 0; > fi; > if [ "$command" = "fcontext" ]; then > COMPREPLY=($(compgen -W "$( __get_all_file_types ) " -- "$cur")); > return 0; > fi; > COMPREPLY=($(compgen -W "$( __get_all_types ) " -- "$cur")); > return 0; > else > if __contains_word "$command" ${VERBS[LOGIN]}; then > COMPREPLY=($(compgen -W "$( __get_login_opts ) " -- "$cur")); > return 0; > else > if __contains_word "$command" ${VERBS[USER]}; then > COMPREPLY=($(compgen -W "$( __get_user_opts ) " -- "$cur")); > return 0; > else > if __contains_word "$command" ${VERBS[PORT]}; then > COMPREPLY=($(compgen -W "$( __get_port_opts ) " -- "$cur")); > return 0; > else > if __contains_word "$command" ${VERBS[INTERFACE]}; then > COMPREPLY=($(compgen -W "$( __get_interface_opts ) " -- "$cur")); > return 0p; > else > if __contains_word "$command" ${VERBS[MODULE]}; then > COMPREPLY=($(compgen -W "$( __get_module_opts ) " -- "$cur")); > return 0; > else > if __contains_word "$command" ${VERBS[NODE]}; then > COMPREPLY=($(compgen -W "$( __get_node_opts ) " -- "$cur")); > return 0; > else > if __contains_word "$command" ${VERBS[FCONTEXT]}; then > COMPREPLY=($(compgen -W "$( __get_fcontext_opts ) " -- "$cur")); > return 0; > else > if __contains_word "$command" ${VERBS[BOOLEAN]}; then > COMPREPLY=($(compgen -W "$( __get_boolean_opts ) " -- "$cur")); > return 0; > else > if __contains_word "$command" ${VERBS[PERMISSIVE]}; then > COMPREPLY=($(compgen -W "$( __get_permissive_opts ) " -- "$cur")); > return 0; > else > if __contains_word "$command" ${VERBS[DONTAUDIT]}; then > COMPREPLY=($(compgen -W "$( __get_dontaudit_opts ) " -- "$cur")); > return 0; > fi; > fi; > fi; > fi; > fi; > fi; > fi; > fi; > fi; > fi; > fi; > fi; > fi; > fi; > fi; > fi; > fi; > COMPREPLY=($(compgen -W "$comps" -- "$cur")); > return 0 >} >_service () >{ > local cur prev words cword; > _init_completion || return; > [[ $cword -gt 2 ]] && return 0; > if [[ $cword -eq 1 && $prev == ?(*/)service ]]; then > _services; > [[ -e /etc/mandrake-release ]] && _xinetd_services; > else > local sysvdirs; > _sysvdirs; > COMPREPLY=($( compgen -W '`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) )); > $restore_nullglob; > COMPREPLY+=($( systemctl list-units --full --all 2>/dev/null | awk '$1 ~ /\.service$/ { sub("\\.service$", "", $1); print $1 }' )); > COMPREPLY=($( compgen -W '${COMPREPLY[@]#${sysvdirs[0]}/}' -- "$cur" )) >} >_setsebool () >{ > local command=${COMP_WORDS[1]}; > local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}; > local verb comps; > if [ "$verb" = "" -a "$prev" = "setsebool" -o "$prev" = "-P" ]; then > COMPREPLY=($(compgen -W "-P $( __get_all_booleans ) " -- "$cur")); > return 0; > fi; > COMPREPLY=($(compgen -W "0 1 -P" -- "$cur")); > return 0 >} >_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}}") >} >_source_highlight () >{ > local cur prev opts; > COMPREPLY=(); > cur="${COMP_WORDS[COMP_CWORD]}"; > prev="${COMP_WORDS[COMP_CWORD-1]}"; > opts="-h --help -V --version -i --input -o --output -s --src-lang --lang-list --outlang-list -f --out-format -d --doc --no-doc -c --css -T --title -t --tab -H --header -F --footer --style-file --outlang-def --outlang-map --data-dir --output-dir --lang-def --lang-map --show-lang-elements --infer-lang -n --line-number --line-number-ref --line-range --range-separator --range-context --regex-range --gen-references --ctags-file --ctags -v --verbose --statistics --gen-version --check-lang --check-outlang --failsafe -g --debug-langdef --show-regex"; > if [[ "${cur}" == -* || ${COMP_CWORD} -eq 1 ]]; then > COMPREPLY=($(compgen -W "${opts}" -- "${cur}")); > return 0; > fi; > case "${prev}" in > -T | --title | -t | --tab | --gen-references | --line-range | --range-separator | --range-context | --regex-range) > COMPREPLY=() > ;; > -i | --input | -o | --output | -c | --css | -H | --header | -F | --footer | --style-file | --outlang-def | --outlang-map | --lang-def | --lang-map | --show-lang-elements | --ctags-file | --check-lang | --check-outlang | --show-regex) > COMPREPLY=($(compgen -A file -- "${cur}")) > ;; > -s | --src-lang) > COMPREPLY=($(compgen -W "C H ac ada am autoconf bib bison c caml cc changelog cls cpp cs csh csharp css diff docbook dtx eps fixed-fortran flex fortran free-fortran glsl h haxe hh hpp htm html hx in ini java javascript js kcfg kdevelop kidl ksh l lang langdef latex ldap ldif lex lgt ll log logtalk lsm lua m4 ml mli moc outlang pas pascal patch perl php php3 php4 php5 pl pm postscript prolog properties ps py python rb rc ruby scala sh shell sig sl slang slsh sml spec sql sty style syslog tcl tcsh tex tk txt ui xhtml xml xorg y yacc yy" -- "${cur}")) > ;; > -f | --out-format) > COMPREPLY=($(compgen -W "docbook esc html html-css htmltable javadoc latex latexcolor texinfo xhtml xhtml-css xhtmltable" -- "${cur}")) > ;; > --data-dir | --output-dir) > COMPREPLY=($(compgen -A directory -- "${cur}")) > ;; > *) > COMPREPLY=($(compgen -W "${opts/${preprev}}" -- "${cur}")) > ;; > esac >} >_spectool () >{ > COMPREPLY=(); > local i; > for i in ${COMP_WORDS[@]}; > do > [[ "$i" == -@(h|-help) ]] && return 0; > done; > local cur prev; > _rpmdev_curprev "$2" "$3"; > case $prev in > -C | --directory) > _filedir -d; > return 0 > ;; > -s | --source | -p | --patch | -d | --define) > return 0 > ;; > esac; > if [[ "$cur" == -* ]]; then > COMPREPLY=($( compgen -W '--list-files --get-files --help --all > --sources --patches --source --patch > --define --directory --sourcedir --dry-run > --force --debug' -- "$cur" )); > else > _filedir spec; > fi >} >_split_longopt () >{ > if [[ "$cur" == --?*=* ]]; then > prev="${cur%%?(\\)=*}"; > cur="${cur#*=}"; > return 0; > fi; > return 1 >} >_svn () >{ > local cur cmds cmdOpts pOpts mOpts rOpts qOpts nOpts optsParam opt; > COMPREPLY=(); > cur=${COMP_WORDS[COMP_CWORD]}; > cmds='add blame annotate praise cat changelist cl checkout co cleanup'; > cmds="$cmds commit ci copy cp delete remove rm diff export help import"; > cmds="$cmds info list ls lock log merge mergeinfo mkdir move mv rename"; > cmds="$cmds patch propdel pdel propedit pedit propget pget proplist"; > cmds="$cmds plist propset pset relocate resolve resolved revert status"; > cmds="$cmds switch unlock update upgrade"; > local helpOpts='--help -h'; > local specOpts="--version $helpOpts"; > optsParam="-r|--revision|--username|--password|--targets"; > optsParam="$optsParam|-x|--extensions|-m|--message|-F|--file"; > optsParam="$optsParam|--encoding|--diff-cmd|--diff3-cmd|--editor-cmd"; > optsParam="$optsParam|--old|--new|--config-dir|--config-option"; > optsParam="$optsParam|--native-eol|-l|--limit|-c|--change"; > optsParam="$optsParam|--depth|--set-depth|--with-revprop"; > optsParam="$optsParam|--cl|--changelist|--accept|--show-revs"; > local svnProps revProps allProps psCmds propCmds; > svnProps="svn:keywords svn:executable svn:needs-lock svn:externals > svn:ignore svn:eol-style svn:mime-type $SVN_BASH_FILE_PROPS"; > revProps="svn:author svn:log svn:date $SVN_BASH_REV_PROPS"; > allProps=($svnProps $revProps); > psCmds='propset|pset|ps'; > propCmds="$psCmds|propget|pget|pg|propedit|pedit|pe|propdel|pdel|pd"; > local urlSchemas='file:/// http:// https:// svn:// svn+ssh://'; > local cmd= isPropCmd= isPsCmd= isHelpCmd= nExpectArgs= isCur= i=0; > local prev= help= prop= val= isRevProp= last='none' nargs=0 stat=; > local options= hasRevPropOpt= hasRevisionOpt= hasRelocateOpt=; > local acceptOpt= URL= hasReintegrateOpt=; > for opt in "${COMP_WORDS[@]}"; > do > [[ -n $isCur ]] && stat=$last; > isCur=; > [[ $i -eq $COMP_CWORD ]] && isCur=1; > let i++; > [ $last = 'none' ] && { > last='first'; > continue > }; > if [[ $prev == @($optsParam) ]]; then > [[ $prev = '--accept' ]] && acceptOpt=$opt; > prev=''; > last='skip'; > continue; > fi; > if [[ $prev == @(<|>|>>|[12]>|[12]>>) ]]; then > prev=''; > last='skip'; > continue; > fi; > prev=$opt; > if [[ ! -n $cmd && -n $opt && ( $opt != -* || $opt == @(${specOpts// /|}) ) ]]; then > cmd=$opt; > [[ $cmd == @($propCmds) ]] && isPropCmd=1; > [[ $cmd == @($psCmds) ]] && isPsCmd=1; > [[ $cmd == @(${helpOpts// /|}) ]] && cmd='help'; > [[ $cmd = 'help' ]] && isHelpCmd=1; > if [[ -n $isHelpCmd && -n $cmd && $cmd != 'help' && ! -n $help ]]; then > help=$cmd; > cmd='help'; > fi; > last='cmd'; > continue; > fi; > if [[ -n $isHelpCmd && ! -n $help && -n $opt && $opt != -* ]]; then > help=$opt; > last='help'; > continue; > fi; > if [[ -n $isPropCmd && ! -n $prop && -n $opt && $opt != -* ]]; then > prop=$opt; > [[ $prop == @(${revProps// /|}) ]] && isRevProp=1; > last='prop'; > continue; > fi; > if [[ -n $isPsCmd && -n $prop && ! -n $val && $opt != -* ]]; then > val=$opt; > last='val'; > continue; > fi; > if [[ $last != 'onlyarg' ]]; then > case $opt in > -r | --revision | --revision=*) > hasRevisionOpt=1 > ;; > --revprop) > hasRevPropOpt=1; > allProps=($revProps); > nExpectArgs=1 > ;; > -h | --help) > isHelpCmd=1 > ;; > -F | --file) > val='-F' > ;; > --relocate) > hasRelocateOpt=1 > ;; > --reintegrate) > hasReintegrateOpt=1 > ;; > esac; > if [[ $opt = '--' && ! -n $isCur ]]; then > last='onlyarg'; > continue; > fi; > if [[ $opt == -* ]]; then > [[ ! -n $isCur ]] && options="$options $opt "; > last='opt'; > continue; > fi; > else > let nargs++; > continue; > fi; > if [[ $cmd = 'merge' && ! -n $URL ]]; then > URL=$opt; > fi; > last='arg'; > let nargs++; > done; > [[ -n $stat ]] || stat=$last; > if [[ ! -n $cmd || $stat = 'cmd' ]]; then > COMPREPLY=($( compgen -W "$cmds $specOpts" -- $cur )); > return 0; > fi; > if [[ $stat = 'help' || ( -n $isHelpCmd && ! -n $help ) ]]; then > COMPREPLY=($( compgen -W "$cmds" -- $cur )); > return 0; > fi; > if [[ $cmd == @(co|checkout|ls|list) && $stat = 'arg' && $SVN_BASH_COMPL_EXT == *urls* ]]; then > if [[ $cur == file:* ]]; then > local where=${cur/file:/}; > COMPREPLY=($(compgen -d -S '/' -X '*/.*' -- $where )); > return; > else > if [[ $cur == *:* ]]; then > local urls= file=; > for file in ~/.subversion/auth/svn.simple/*; > do > if [ -r $file ]; then > local url=$(_svn_read_hashfile svn:realmstring < $file); > url=${url/*</}; > url=${url/>*/}; > urls="$urls $url"; > fi; > done; > local prefix=${cur%:*} suffix=${cur#*:} c= choices=; > for c in $urls; > do > [[ $c == $prefix:* ]] && choices="$choices ${c#*:}"; > done; > COMPREPLY=($(compgen -W "$choices" -- $suffix )); > return; > else > COMPREPLY=($(compgen -W "$urlSchemas" -- $cur)); > return; > fi; > fi; > fi; > if [[ $cmd = 'merge' || $cmd = 'mergeinfo' ]]; then > local here=$(_svn_info URL); > if [[ ! -n $URL && $stat = 'arg' ]]; then > if [[ "$here" == */branches/* ]]; then > COMPREPLY=($(compgen -W ${here/\/branches\/*/\/trunk} -- $cur )); > return 0; > else > if [[ "$here" == */trunk* ]]; then > COMPREPLY=($(compgen -W ${here/\/trunk*/\/branches\/} -- $cur )); > return 0; > else > COMPREPLY=($(compgen -W $(_svn_info Root) -- $cur )); > return 0; > fi; > fi; > else > if [[ $URL == */branches/* && $here == */trunk* && ! -n $hasReintegrateOpt && $cur = '' && $stat = 'arg' ]]; then > COMPREPLY=($(compgen -W '--reintegrate' -- $cur )); > return 0; > fi; > fi; > fi; > if [[ $stat = 'skip' ]]; then > local previous=${COMP_WORDS[COMP_CWORD-1]}; > local values= dirs= beep= exes=; > [[ $previous = '--config-dir' ]] && dirs=1; > [[ $previous = --*-cmd ]] && exes=1; > [[ $previous = '--native-eol' ]] && values='LF CR CRLF'; > [[ $previous = '--limit' ]] && values='0 1 2 3 4 5 6 7 8 9'; > [[ $previous = '--revision' || $previous = '-r' ]] && values='HEAD BASE PREV COMMITTED 0 {'; > [[ $previous = '--encoding' ]] && values="latin1 utf8 $SVN_BASH_ENCODINGS"; > [[ $previous = '--extensions' || $previous = '-x' ]] && values="--unified --ignore-space-change --ignore-all-space --ignore-eol-style"; > [[ $previous = '--depth' ]] && values='empty files immediates infinity'; > [[ $previous = '--set-depth' ]] && values='empty exclude files immediates infinity'; > [[ $previous = '--accept' ]] && { > if [[ $cmd = 'resolve' ]]; then > values='base working mine-full theirs-full'; > else > values='postpone base mine-full theirs-full edit launch'; > fi > }; > [[ $previous = '--show-revs' ]] && values='merged eligible'; > if [[ $previous = '--username' ]]; then > values="$SVN_BASH_USERNAME"; > if [[ $SVN_BASH_COMPL_EXT == *username* ]]; then > local file=; > for file in ~/.subversion/auth/svn.simple/*; > do > if [ -r $file ]; then > values="$values $(_svn_read_hashfile username < $file)"; > fi; > done; > fi; > [[ ! -n "$values" ]] && beep=1; > fi; > [[ $previous = '--password' ]] && beep=1; > [[ -n $values ]] && COMPREPLY=($( compgen -W "$values" -- $cur )); > [[ -n $dirs ]] && COMPREPLY=($( compgen -o dirnames -- $cur )); > [[ -n $exes ]] && COMPREPLY=($( compgen -c -- $cur )); > [[ -n $beep ]] && { > echo -en "\a"; > COMPREPLY=('') > }; > return 0; > fi; > if [[ -n $isPropCmd && ( ! -n $prop || $stat = 'prop' ) && $cur != -* ]]; then > local choices=; > if [[ $cur == *:* ]]; then > local prefix=${cur%:*} suffix=${cur#*:} c=; > for c in ${allProps[@]}; > do > [[ $c == $prefix:* ]] && choices="$choices ${c#*:}"; > done; > cur=$suffix; > else > COMPREPLY=($( compgen -W "${allProps[*]}" -- $cur )); > [ ${#COMPREPLY[@]} -eq 1 ] && return 0; > local seen= n=0 last= c=; > for c in ${allProps[@]%:*}; > do > if [[ $c == $cur* && ( ! -n $seen || $c != @($seen) ) ]]; then > let n++; > last=$c; > choices="$choices $c:"; > if [[ -n $seen ]]; then > seen="$seen|$c*"; > else > seen="$c*"; > fi; > fi; > done; > [[ $n -eq 1 ]] && choices="$last:1 $last:2"; > fi; > COMPREPLY=($( compgen -W "$choices" -- $cur )); > return 0; > fi; > if [[ -n $isRevProp && ! -n $hasRevPropOpt ]]; then > COMPREPLY=($( compgen -W '--revprop' -- $cur )); > return 0; > fi; > if [[ -n $isRevProp && -n $hasRevPropOpt && ! -n $hasRevisionOpt ]]; then > COMPREPLY=($( compgen -W '--revision' -- $cur )); > return 0; > fi; > if [[ -n $isPsCmd && -n $prop && ( ! -n $val || $stat = 'val' ) ]]; then > local values="\' --file"; > case $prop in > svn:keywords) > values="Id Rev URL Date Author Header \' $SVN_BASH_KEYWORDS" > ;; > svn:executable | svn:needs-lock) > values='\\*' > ;; > svn:eol-style) > values='native LF CR CRLF' > ;; > svn:mime-type) > values="text/ text/plain text/html text/xml text/rtf > image/ image/png image/gif image/jpeg image/tiff > audio/ audio/midi audio/mpeg > video/ video/mpeg video/mp4 > application/ application/octet-stream > $SVN_BASH_MIME_TYPE" > ;; > esac; > COMPREPLY=($( compgen -W "$values" -- $cur )); > [[ -n ${COMPREPLY} ]] && return 0; > fi; > if [[ $cmd = 'resolve' && ! -n $acceptOpt ]]; then > COMPREPLY=($( compgen -W '--accept' -- $cur )); > return 0; > fi; > case $cmd in > merge) > nExpectArgs=3 > ;; > mergeinfo) > nExpectArgs=1 > ;; > copy | cp | move | mv | rename | ren | export | import) > nExpectArgs=2 > ;; > switch | sw) > [[ ! -n $hasRelocateOpt ]] && nExpectArgs=2 > ;; > help | h) > nExpectArgs=0 > ;; > --version) > nExpectArgs=0 > ;; > esac; > if [[ -n $nExpectArgs && $nargs -gt $nExpectArgs ]]; then > echo -en "\a"; > COMPREPLY=(''); > return 0; > fi; > if [[ $cur != -* || $stat = 'onlyarg' ]]; then > if [[ $SVN_BASH_COMPL_EXT == *svnstatus* ]]; then > local status='svn status --non-interactive'; > [[ $SVN_BASH_COMPL_EXT == *recurse* ]] || status="$status --non-recursive"; > [[ $SVN_BASH_COMPL_EXT == *externals* ]] || status="$status --ignore-externals"; > local cs= files=; > [[ -n $cur ]] && cs=$cur*; > case $cmd in > st*) > files=$cur* > ;; > ci | commit | revert | di*) > files=$($status $cs| _svn_grcut '@([MADR!]*| M*|_M*)') > ;; > add) > files=$($status $cs| _svn_grcut '\?*') > ;; > unlock) > files=$($status $cs| _svn_grcut '@(??L*|?????[KOTB]*)') > ;; > resolve*) > files=$($status $cs| _svn_grcut '@(?C*|C*)') > ;; > praise | blame | ann*) > files=$( _svn_lls all $cur* ) > ;; > p*) > if [[ $cmd == @($propCmds) && $prop == @(svn:ignore|svn:externals) ]]; then > files=$( _svn_lls dir . $cur* ); > else > files="$( _svn_lls all $cur* ) > $($status $cs | _svn_grcut 'A*' )"; > fi > ;; > info) > files="$( _svn_lls all $cur* ) > $($status $cs | _svn_grcut 'A*' )" > ;; > remove | rm | del* | move | mv | rename) > files=$( _svn_lls all $cur* ) > ;; > mkdir) > files=$( _svn_lls dir $cur* ) > ;; > log | lock | up* | cl* | switch) > files=$( _svn_lls all $cur* ) > ;; > merge) > files=$( _svn_lls all $cur* ) > ;; > ls | list) > files=$( _svn_lls all $cur* ) > ;; > *) > local fallback=1 > ;; > esac; > if [[ $SVN_BASH_COMPL_EXT != *recurse* ]]; then > files="$files $( _svn_lls dir $cur* )"; > fi; > if [[ -n $files ]]; then > COMPREPLY=($( compgen -W "$files" -- $cur )); > [[ -n "${COMPREPLY[*]}" ]] || COMPREPLY=(''); > else > if [[ ! -n $fallback ]]; then > echo -en "\a"; > COMPREPLY=(''); > fi; > fi; > fi; > return 0; > fi; > pOpts="--username --password --no-auth-cache --non-interactive --trust-server-cert"; > mOpts="-m --message -F --file --encoding --force-log --with-revprop"; > rOpts="-r --revision"; > qOpts="-q --quiet"; > nOpts="-N --non-recursive --depth"; > gOpts="-g --use-merge-history"; > cOpts="--cl --changelist"; > cmdOpts=; > case $cmd in > --version) > cmdOpts="$qOpts" > ;; > add) > cmdOpts="--auto-props --no-auto-props --force --targets --no-ignore --parents $nOpts $qOpts $pOpts" > ;; > blame | annotate | ann | praise) > cmdOpts="$rOpts $pOpts -v --verbose --incremental --xml -x --extensions --force $gOpts" > ;; > cat) > cmdOpts="$rOpts $pOpts" > ;; > changelist | cl) > cmdOpts="--targets $pOpts $qOpts $cOpts -R --recursive --depth --remove" > ;; > checkout | co) > cmdOpts="$rOpts $qOpts $nOpts $pOpts --ignore-externals --force" > ;; > cleanup) > cmdOpts="--diff3-cmd $pOpts" > ;; > commit | ci) > cmdOpts="$mOpts $qOpts $nOpts --targets --editor-cmd $pOpts --no-unlock $cOpts --keep-changelists" > ;; > copy | cp) > cmdOpts="$mOpts $rOpts $qOpts --editor-cmd $pOpts --parents --ignore-externals" > ;; > delete | del | remove | rm) > cmdOpts="--force $mOpts $qOpts --targets --editor-cmd $pOpts --keep-local" > ;; > diff | di) > cmdOpts="$rOpts -x --extensions --diff-cmd --no-diff-deleted $nOpts $pOpts --force --old --new --notice-ancestry -c --change --summarize $cOpts --xml --git --internal-diff --show-copies-as-adds" > ;; > export) > cmdOpts="$rOpts $qOpts $pOpts $nOpts --force --native-eol --ignore-externals --ignore-keywords" > ;; > help | h | \?) > cmdOpts= > ;; > import) > cmdOpts="--auto-props --no-auto-props $mOpts $qOpts $nOpts --no-ignore --editor-cmd $pOpts --force" > ;; > info) > cmdOpts="$pOpts $rOpts --targets -R --recursive --depth --incremental --xml $cOpts" > ;; > list | ls) > cmdOpts="$rOpts -v --verbose -R --recursive $pOpts --incremental --xml --depth" > ;; > lock) > cmdOpts="-m --message -F --file --encoding --force-log --targets --force $pOpts" > ;; > log) > cmdOpts="$rOpts -v --verbose --targets $pOpts --stop-on-copy --incremental --xml $qOpts -l --limit -c --change $gOpts --with-all-revprops --with-revprop --depth --diff --diff-cmd -x --extensions --internal-diff --with-no-revprops" > ;; > merge) > cmdOpts="$rOpts $nOpts $qOpts --force --dry-run --diff3-cmd $pOpts --ignore-ancestry -c --change -x --extensions --record-only --accept --reintegrate --allow-mixed-revisions" > ;; > mergeinfo) > cmdOpts="$rOpts $pOpts --depth --show-revs -R --recursive" > ;; > mkdir) > cmdOpts="$mOpts $qOpts --editor-cmd $pOpts --parents" > ;; > move | mv | rename | ren) > cmdOpts="$mOpts $rOpts $qOpts --force --editor-cmd $pOpts --parents" > ;; > patch) > cmdOpts="$qOpts $pOpts --dry-run --ignore-whitespace --reverse-diff --strip" > ;; > propdel | pdel | pd) > cmdOpts="$qOpts -R --recursive $rOpts $pOpts $cOpts --depth"; > [[ -n $isRevProp || ! -n $prop ]] && cmdOpts="$cmdOpts --revprop" > ;; > propedit | pedit | pe) > cmdOpts="--editor-cmd $pOpts $mOpts --force"; > [[ -n $isRevProp || ! -n $prop ]] && cmdOpts="$cmdOpts --revprop $rOpts" > ;; > propget | pget | pg) > cmdOpts="-v --verbose -R --recursive $rOpts --strict $pOpts $cOpts --depth --xml"; > [[ -n $isRevProp || ! -n $prop ]] && cmdOpts="$cmdOpts --revprop" > ;; > proplist | plist | pl) > cmdOpts="-v --verbose -R --recursive $rOpts --revprop $qOpts $pOpts $cOpts --depth --xml" > ;; > propset | pset | ps) > cmdOpts="$qOpts --targets -R --recursive --encoding $pOpts --force $cOpts --depth"; > [[ -n $isRevProp || ! -n $prop ]] && cmdOpts="$cmdOpts --revprop $rOpts"; > [[ -n $val ]] || cmdOpts="$cmdOpts -F --file" > ;; > relocate) > cmdOpts="--ignore-externals $pOpts" > ;; > resolve) > cmdOpts="--targets -R --recursive $qOpts $pOpts --accept --depth" > ;; > resolved) > cmdOpts="--targets -R --recursive $qOpts $pOpts --depth" > ;; > revert) > cmdOpts="--targets -R --recursive $qOpts $cOpts --depth $pOpts" > ;; > status | stat | st) > cmdOpts="-u --show-updates -v --verbose $nOpts $qOpts $pOpts --no-ignore --ignore-externals --incremental --xml $cOpts" > ;; > switch | sw) > cmdOpts="--relocate $rOpts $nOpts $qOpts $pOpts --diff3-cmd --force --accept --ignore-externals --set-depth --ignore-ancestry" > ;; > unlock) > cmdOpts="--targets --force $pOpts" > ;; > update | up) > cmdOpts="$rOpts $nOpts $qOpts $pOpts --diff3-cmd --ignore-externals --force --accept $cOpts --parents --editor-cmd --set-depth" > ;; > upgrade) > cmdOpts="$qOpts $pOpts" > ;; > *) > > ;; > esac; > [[ "$cmd" != "--version" ]] && cmdOpts="$cmdOpts $helpOpts"; > cmdOpts="$cmdOpts --config-dir --config-option"; > if [[ $acceptOpt == @(edit|launch) ]]; then > cmdOpts=${cmdOpts/ --non-interactive / }; > fi; > for opt in $options; > do > local optBase; > case $opt in > --*) > optBase=${opt/=*/} > ;; > -*) > optBase=${opt:0:2} > ;; > esac; > cmdOpts=" $cmdOpts "; > cmdOpts=${cmdOpts/ ${optBase} / }; > case $optBase in > -v) > cmdOpts=${cmdOpts/ --verbose / } > ;; > --verbose) > cmdOpts=${cmdOpts/ -v / } > ;; > -N) > cmdOpts=${cmdOpts/ --non-recursive / } > ;; > --non-recursive) > cmdOpts=${cmdOpts/ -N / } > ;; > -R) > cmdOpts=${cmdOpts/ --recursive / } > ;; > --recursive) > cmdOpts=${cmdOpts/ -R / } > ;; > -x) > cmdOpts=${cmdOpts/ --extensions / } > ;; > --extensions) > cmdOpts=${cmdOpts/ -x / } > ;; > -q) > cmdOpts=${cmdOpts/ --quiet / } > ;; > --quiet) > cmdOpts=${cmdOpts/ -q / } > ;; > -h) > cmdOpts=${cmdOpts/ --help / } > ;; > --help) > cmdOpts=${cmdOpts/ -h / } > ;; > -l) > cmdOpts=${cmdOpts/ --limit / } > ;; > --limit) > cmdOpts=${cmdOpts/ -l / } > ;; > -r) > cmdOpts=${cmdOpts/ --revision / } > ;; > --revision) > cmdOpts=${cmdOpts/ -r / } > ;; > -c) > cmdOpts=${cmdOpts/ --change / } > ;; > --change) > cmdOpts=${cmdOpts/ -c / } > ;; > --auto-props) > cmdOpts=${cmdOpts/ --no-auto-props / } > ;; > --no-auto-props) > cmdOpts=${cmdOpts/ --auto-props / } > ;; > -g) > cmdOpts=${cmdOpts/ --use-merge-history / } > ;; > --use-merge-history) > cmdOpts=${cmdOpts/ -g / } > ;; > -m | --message | -F | --file) > cmdOpts=${cmdOpts/ --message / }; > cmdOpts=${cmdOpts/ -m / }; > cmdOpts=${cmdOpts/ --file / }; > cmdOpts=${cmdOpts/ -F / } > ;; > esac; > if [ $isHelpCmd ]; then > cmdOpts=${cmdOpts/ -h / }; > cmdOpts=${cmdOpts/ --help / }; > fi; > done; > COMPREPLY=($( compgen -W "$cmdOpts" -- $cur )); > return 0 >} >_svn_grcut () >{ > local re=$1 line= old_IFS; > old_IFS="$IFS"; > IFS=' >'; > while read -r line; do > [[ ! -n $re || $line == $re ]] && echo "${line/????????/}"; > done; > IFS="$old_IFS" >} >_svn_info () >{ > local what=$1 line=; > LANG=C LC_MESSAGES=C svn info --non-interactive 2> /dev/null | while read line; do > [[ $line == *"$what: "* ]] && echo ${line#*: }; > done >} >_svn_lls () >{ > local opt=$1 f=; > shift; > for f in "$@"; > do > if [[ $opt == @(dir|all) && -d "$f" ]]; then > echo "$f/"; > else > if [[ $opt == @(file|all) ]]; then > local dn= fn="$f"; > [[ "$f" == */* ]] && dn=${f%\/*}/ fn=${f##*\/}; > [ -f "${dn}.svn/text-base/${fn}.svn-base" ] && echo "$f"; > fi; > fi; > done >} >_svn_read_hashfile () >{ > local tkey=$1 key= val=; > while true; do > read tag len; > [ $tag = 'END' ] && break; > [ $tag != 'K' ] && { > return > }; > read -r -n $len key; > read; > read tag len; > [ $tag != 'V' ] && { > return > }; > read -r -n $len val; > read; > if [[ $key = $tkey ]]; then > echo "$val"; > return; > fi; > done >} >_svnadmin () >{ > local cur cmds cmdOpts optsParam opt helpCmds optBase i; > COMPREPLY=(); > cur=${COMP_WORDS[COMP_CWORD]}; > cmds='crashtest create deltify dump help hotcopy list-dblogs \ > list-unused-dblogs load lslocks lstxns pack recover rmlocks \ > rmtxns setlog setrevprop setuuid upgrade verify --version'; > if [[ $COMP_CWORD -eq 1 ]]; then > COMPREPLY=($( compgen -W "$cmds" -- $cur )); > return 0; > fi; > optsParam="-r|--revision|--parent-dir|--fs-type"; > helpCmds='help|--help|h|\?'; > if [[ ${COMP_WORDS[1]} != @($helpCmds) ]] && [[ "$cur" != -* ]] || [[ ${COMP_WORDS[COMP_CWORD-1]} == @($optsParam) ]]; then > return 0; > fi; > cmdOpts=; > case ${COMP_WORDS[1]} in > create) > cmdOpts="--bdb-txn-nosync --bdb-log-keep --config-dir --fs-type --pre-1.4-compatible --pre-1.5-compatible" > ;; > deltify) > cmdOpts="-r --revision -q --quiet" > ;; > dump) > cmdOpts="-r --revision --incremental -q --quiet --deltas" > ;; > help | h | \?) > cmdOpts="$cmds" > ;; > hotcopy) > cmdOpts="--clean-logs" > ;; > load) > cmdOpts="--ignore-uuid --force-uuid --parent-dir -q --quiet --use-pre-commit-hook --use-post-commit-hook" > ;; > recover) > cmdOpts="--wait" > ;; > rmtxns) > cmdOpts="-q --quiet" > ;; > setlog) > cmdOpts="-r --revision --bypass-hooks" > ;; > setrevprop) > cmdOpts="-r --revision --use-pre-revprop-change-hook --use-post-revprop-change-hook" > ;; > verify) > cmdOpts="-r --revision -q --quiet" > ;; > *) > > ;; > esac; > cmdOpts="$cmdOpts --help -h"; > for ((i=2; i<=$COMP_CWORD-1; ++i )) > do > opt=${COMP_WORDS[$i]}; > case $opt in > --*) > optBase=${opt/=*/} > ;; > -*) > optBase=${opt:0:2} > ;; > esac; > cmdOpts=" $cmdOpts "; > cmdOpts=${cmdOpts/ ${optBase} / }; > case $optBase in > -q) > cmdOpts=${cmdOpts/ --quiet / } > ;; > --quiet) > cmdOpts=${cmdOpts/ -q / } > ;; > -h) > cmdOpts=${cmdOpts/ --help / } > ;; > --help) > cmdOpts=${cmdOpts/ -h / } > ;; > -r) > cmdOpts=${cmdOpts/ --revision / } > ;; > --revision) > cmdOpts=${cmdOpts/ -r / } > ;; > esac; > if [[ $opt == @($optsParam) ]]; then > ((++i)); > fi; > done; > COMPREPLY=($( compgen -W "$cmdOpts" -- $cur )); > return 0 >} >_svndumpfilter () >{ > local cur cmds cmdOpts optsParam opt helpCmds optBase i; > COMPREPLY=(); > cur=${COMP_WORDS[COMP_CWORD]}; > cmds='exclude help include --version'; > if [[ $COMP_CWORD -eq 1 ]]; then > COMPREPLY=($( compgen -W "$cmds" -- $cur )); > return 0; > fi; > optsParam="--targets"; > helpCmds='help|--help|h|\?'; > if [[ ${COMP_WORDS[1]} != @($helpCmds) ]] && [[ "$cur" != -* ]] || [[ ${COMP_WORDS[COMP_CWORD-1]} == @($optsParam) ]]; then > return 0; > fi; > cmdOpts=; > case ${COMP_WORDS[1]} in > exclude | include) > cmdOpts="--drop-empty-revs --renumber-revs > --skip-missing-merge-sources --targets > --preserve-revprops --quiet" > ;; > help | h | \?) > cmdOpts="$cmds" > ;; > *) > > ;; > esac; > cmdOpts="$cmdOpts --help -h"; > for ((i=2; i<=$COMP_CWORD-1; ++i )) > do > opt=${COMP_WORDS[$i]}; > case $opt in > --*) > optBase=${opt/=*/} > ;; > -*) > optBase=${opt:0:2} > ;; > esac; > cmdOpts=" $cmdOpts "; > cmdOpts=${cmdOpts/ ${optBase} / }; > case $optBase in > -h) > cmdOpts=${cmdOpts/ --help / } > ;; > --help) > cmdOpts=${cmdOpts/ -h / } > ;; > esac; > if [[ $opt == @($optsParam) ]]; then > ((++i)); > fi; > done; > COMPREPLY=($( compgen -W "$cmdOpts" -- $cur )); > return 0 >} >_svnlook () >{ > local cur cmds cmdOpts optsParam opt helpCmds optBase i; > COMPREPLY=(); > cur=${COMP_WORDS[COMP_CWORD]}; > cmds='author cat changed date diff dirs-changed help history info \ > lock log propget proplist tree uuid youngest --version'; > if [[ $COMP_CWORD -eq 1 ]]; then > COMPREPLY=($( compgen -W "$cmds" -- $cur )); > return 0; > fi; > optsParam="-r|--revision|-t|--transaction|-l|--limit|-x|--extensions"; > helpCmds='help|--help|h|\?'; > if [[ ${COMP_WORDS[1]} != @($helpCmds) ]] && [[ "$cur" != -* ]] || [[ ${COMP_WORDS[COMP_CWORD-1]} == @($optsParam) ]]; then > return 0; > fi; > cmdOpts=; > case ${COMP_WORDS[1]} in > author) > cmdOpts="-r --revision -t --transaction" > ;; > cat) > cmdOpts="-r --revision -t --transaction" > ;; > changed) > cmdOpts="-r --revision -t --transaction --copy-info" > ;; > date) > cmdOpts="-r --revision -t --transaction" > ;; > diff) > cmdOpts="-r --revision -t --transaction --diff-copy-from --no-diff-added --no-diff-deleted -x --extensions" > ;; > dirs-changed) > cmdOpts="-r --revision -t --transaction" > ;; > help | h | \?) > cmdOpts="$cmds" > ;; > history) > cmdOpts="-r --revision -l --limit --show-ids" > ;; > info) > cmdOpts="-r --revision -t --transaction" > ;; > lock) > cmdOpts= > ;; > log) > cmdOpts="-r --revision -t --transaction" > ;; > propget | pget | pg) > cmdOpts="-r --revision -t --transaction --revprop" > ;; > proplist | plist | pl) > cmdOpts="-r --revision -t --transaction --revprop -v --verbose --xml" > ;; > tree) > cmdOpts="-r --revision -t --transaction --full-paths -N --non-recursive --show-ids" > ;; > uuid) > cmdOpts= > ;; > youngest) > cmdOpts= > ;; > *) > > ;; > esac; > cmdOpts="$cmdOpts --help -h"; > for ((i=2; i<=$COMP_CWORD-1; ++i )) > do > opt=${COMP_WORDS[$i]}; > case $opt in > --*) > optBase=${opt/=*/} > ;; > -*) > optBase=${opt:0:2} > ;; > esac; > cmdOpts=" $cmdOpts "; > cmdOpts=${cmdOpts/ ${optBase} / }; > case $optBase in > -N) > cmdOpts=${cmdOpts/ --non-recursive / } > ;; > --non-recursive) > cmdOpts=${cmdOpts/ -N / } > ;; > -h) > cmdOpts=${cmdOpts/ --help / } > ;; > --help) > cmdOpts=${cmdOpts/ -h / } > ;; > -l) > cmdOpts=${cmdOpts/ --limit / } > ;; > --limit) > cmdOpts=${cmdOpts/ -l / } > ;; > -r) > cmdOpts=${cmdOpts/ --revision / } > ;; > --revision) > cmdOpts=${cmdOpts/ -r / } > ;; > -t) > cmdOpts=${cmdOpts/ --transaction / } > ;; > --transaction) > cmdOpts=${cmdOpts/ -t / } > ;; > -v) > cmdOpts=${cmdOpts/ --verbose / } > ;; > --verbose) > cmdOpts=${cmdOpts/ -v / } > ;; > -x) > cmdOpts=${cmdOpts/ --extensions / } > ;; > --extensions) > cmdOpts=${cmdOpts/ -x / } > ;; > esac; > if [[ $opt == @($optsParam) ]]; then > ((++i)); > fi; > done; > COMPREPLY=($( compgen -W "$cmdOpts" -- $cur )); > return 0 >} >_svnsync () >{ > local cur cmds cmdOpts optsParam opt helpCmds optBase i; > COMPREPLY=(); > cur=${COMP_WORDS[COMP_CWORD]}; > cmds='copy-revprops help info initialize synchronize --version'; > if [[ $COMP_CWORD -eq 1 ]]; then > COMPREPLY=($( compgen -W "$cmds" -- $cur )); > return 0; > fi; > optsParam="--config-dir|--config-option|--source-username|--source-password"; > optsParam="$optsParam|--sync-username|--sync-password"; > helpCmds='help|--help|h|\?'; > if [[ ${COMP_WORDS[1]} != @($helpCmds) ]] && [[ "$cur" != -* ]] || [[ ${COMP_WORDS[COMP_CWORD-1]} == @($optsParam) ]]; then > return 0; > fi; > cmdOpts=; > case ${COMP_WORDS[1]} in > copy-revprops | initialize | init | synchronize | sync) > cmdOpts="--non-interactive --no-auth-cache --trust-server-cert --source-username --source-password --sync-username --sync-password --config-dir --config-option -q --quiet" > ;; > help | h | \?) > cmdOpts="$cmds" > ;; > info) > cmdOpts="--non-interactive --no-auth-cache --trust-server-cert --source-username --source-password --sync-username --sync-password --config-dir --config-option" > ;; > *) > > ;; > esac; > cmdOpts="$cmdOpts --help -h"; > for ((i=2; i<=$COMP_CWORD-1; ++i )) > do > opt=${COMP_WORDS[$i]}; > case $opt in > --*) > optBase=${opt/=*/} > ;; > -*) > optBase=${opt:0:2} > ;; > esac; > cmdOpts=" $cmdOpts "; > cmdOpts=${cmdOpts/ ${optBase} / }; > case $optBase in > -h) > cmdOpts=${cmdOpts/ --help / } > ;; > --help) > cmdOpts=${cmdOpts/ -h / } > ;; > -q) > cmdOpts=${cmdOpts/ --quiet / } > ;; > --quiet) > cmdOpts=${cmdOpts/ -q / } > ;; > esac; > if [[ $opt == @($optsParam) ]]; then > ((++i)); > fi; > done; > COMPREPLY=($( compgen -W "$cmdOpts" -- $cur )); > return 0 >} >_svnversion () >{ > local cmdOpts=" -n --no-newline -c --committed -h --help --version "; > local cur=${COMP_WORDS[COMP_CWORD]}; > COMPREPLY=(); > local options= wcpath= trailurl= last='none' stat= opt= i=-1 isCur=; > for opt in ${COMP_WORDS[@]}; > do > [[ $i -eq $COMP_CWORD ]] && stat=$last; > let i++; > isCur=; > [[ $i -eq $COMP_CWORD ]] && isCur=1; > if [ $last = 'none' ]; then > last='first'; > continue; > fi; > if [[ $last != 'arg' && $opt == -* ]]; then > if [[ $opt = '--' && ! -n $isCur ]]; then > last='arg'; > else > options="$options $opt "; > last='opt'; > fi; > continue; > fi; > if [[ $opt != -* ]]; then > last='arg'; > if [[ ! -n $wcpath ]]; then > wcpath=$opt; > else > if [[ ! -n $trailurl ]]; then > trailurl=$opt; > fi; > fi; > fi; > done; > [[ -n $stat ]] || stat=$last; > if [[ $cur != -* || $stat = 'arg' ]]; then > [[ -n $wcpath && -n $trailurl ]] && COMPREPLY=(''); > return 0; > fi; > for opt in $options; > do > cmdOpts=${cmdOpts/ $opt / }; > case $opt in > -n) > cmdOpts=${cmdOpts/ --no-newline / } > ;; > --no-newline) > cmdOpts=${cmdOpts/ -n / } > ;; > -h) > cmdOpts=${cmdOpts/ --help / } > ;; > --help) > cmdOpts=${cmdOpts/ -h / } > ;; > -c) > cmdOpts=${cmdOpts/ --committed / } > ;; > --committed) > cmdOpts=${cmdOpts/ -c / } > ;; > esac; > done; > COMPREPLY=($( compgen -W "$cmdOpts" -- $cur )); > return 0 >} >_systemctl () >{ > local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}; > local verb comps; > local -A OPTS=([STANDALONE]='--all -a --defaults --fail --ignore-dependencies --failed --force -f --full --global > --help -h --no-ask-password --no-block --no-legend --no-pager --no-reload --no-wall > --order --require --quiet -q --privileged -P --system --user --version --runtime' [ARG]='--host -H --kill-mode --kill-who --property -p --signal -s --type -t --root'); > if __contains_word "$prev" ${OPTS[ARG]}; then > case $prev in > --signal | -s) > comps=$(compgen -A signal) > ;; > --type | -t) > comps='automount device mount path service snapshot socket swap target timer' > ;; > --kill-who) > comps='all control main' > ;; > --kill-mode) > comps='control-group process' > ;; > --root) > comps=$(compgen -A directory -- "$cur" ); > compopt -o filenames > ;; > --host | -H) > comps=$(compgen -A hostname) > ;; > --property | -p) > comps='' > ;; > esac; > COMPREPLY=($(compgen -W '$comps' -- "$cur")); > return 0; > fi; > if [[ "$cur" = -* ]]; then > COMPREPLY=($(compgen -W '${OPTS[*]}' -- "$cur")); > return 0; > fi; > local -A VERBS=([ALL_UNITS]='is-active is-enabled status show mask preset' [ENABLED_UNITS]='disable reenable' [DISABLED_UNITS]='enable' [FAILED_UNITS]='reset-failed' [STARTABLE_UNITS]='start' [STOPPABLE_UNITS]='stop condstop kill try-restart condrestart' [ISOLATABLE_UNITS]='isolate' [RELOADABLE_UNITS]='reload condreload reload-or-try-restart force-reload' [RESTARTABLE_UNITS]='restart reload-or-restart' [MASKED_UNITS]='unmask' [JOBS]='cancel' [SNAPSHOTS]='delete' [ENVS]='set-environment unset-environment' [STANDALONE]='daemon-reexec daemon-reload default dot dump > emergency exit halt kexec list-jobs list-units > list-unit-files poweroff reboot rescue show-environment' [NAME]='snapshot load' [FILE]='link'); > for ((i=0; $i <= $COMP_CWORD; i++)) > do > if __contains_word "${COMP_WORDS[i]}" ${VERBS[*]} && ! __contains_word "${COMP_WORDS[i-1]}" ${OPTS[ARG}]}; then > verb=${COMP_WORDS[i]}; > break; > fi; > done; > if [[ -z $verb ]]; then > comps="${VERBS[*]}"; > else > if __contains_word "$verb" ${VERBS[ALL_UNITS]}; then > comps=$( __get_all_units ); > else > if __contains_word "$verb" ${VERBS[ENABLED_UNITS]}; then > comps=$( __get_enabled_units ); > else > if __contains_word "$verb" ${VERBS[DISABLED_UNITS]}; then > comps=$( __get_disabled_units ); > else > if __contains_word "$verb" ${VERBS[STARTABLE_UNITS]}; then > comps=$( __filter_units_by_property CanStart yes $( __get_inactive_units | while read -r line; do [[ "$line" =~ \.(device|snapshot)$ ]] || printf "%s\n" "$line"; done )); > else > if __contains_word "$verb" ${VERBS[RESTARTABLE_UNITS]}; then > comps=$( __filter_units_by_property CanStart yes $( __get_all_units | while read -r line; do [[ "$line" =~ \.(device|snapshot|socket|timer)$ ]] || printf "%s\n" "$line"; done )); > else > if __contains_word "$verb" ${VERBS[STOPPABLE_UNITS]}; then > comps=$( __filter_units_by_property CanStop yes $( __get_active_units ) ); > else > if __contains_word "$verb" ${VERBS[RELOADABLE_UNITS]}; then > comps=$( __filter_units_by_property CanReload yes $( __get_active_units ) ); > else > if __contains_word "$verb" ${VERBS[ISOLATABLE_UNITS]}; then > comps=$( __filter_units_by_property AllowIsolate yes $( __get_all_units ) ); > else > if __contains_word "$verb" ${VERBS[FAILED_UNITS]}; then > comps=$( __get_failed_units ); > else > if __contains_word "$verb" ${VERBS[MASKED_UNITS]}; then > comps=$( __get_masked_units ); > else > if __contains_word "$verb" ${VERBS[STANDALONE]} ${VERBS[NAME]}; then > comps=''; > else > if __contains_word "$verb" ${VERBS[JOBS]}; then > comps=$( __systemctl list-jobs | { while read -r a b; do printf "%s\n" "$a"; done; } ); > else > if __contains_word "$verb" ${VERBS[SNAPSHOTS]}; then > comps=$( __systemctl list-units --type snapshot --full --all | { while read -r a b; do printf "%s\n" "$a"; done; } ); > else > if __contains_word "$verb" ${VERBS[ENVS]}; then > comps=$( __systemctl show-environment | while read -r line; do printf "%s\n" "${line%%=*}=";done ); > compopt -o nospace; > else > if __contains_word "$verb" ${VERBS[FILE]}; then > comps=$( compgen -A file -- "$cur" ); > compopt -o filenames; > fi; > fi; > fi; > fi; > fi; > fi; > fi; > fi; > fi; > fi; > fi; > fi; > fi; > fi; > fi; > fi; > COMPREPLY=($(compgen -W '$comps' -- "$cur")); > return 0 >} >_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 "$( 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 -- "$cur" )); > fi; > return 0 >} >_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 > [[ $cur == *{* ]] && local suffix=} || local suffix=; > COMPREPLY+=($( compgen -P ${BASH_REMATCH[1]} -S "$suffix" -v -- "${BASH_REMATCH[2]}" )); > return 0; > fi; > return 1 >} >_xfunc () >{ > set -- "$@"; > local srcfile=$1; > shift; > declare -F $1 &>/dev/null || { > local compdir=./completions; > [[ $BASH_SOURCE == */* ]] && compdir="${BASH_SOURCE%/*}/completions"; > . "$compdir/$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 >} >_yu_builddep () >{ > local cur prev words=() split=false; > _yu_init_completion "$2" "$3"; > _yum_complete_baseopts "$cur" "$prev" && return 0; > case $prev in > --target) > declare -F _rpm_buildarchs &>/dev/null && _rpm_buildarchs; > return 0 > ;; > esac; > $split && return 0; > if [[ $cur == -* ]]; then > COMPREPLY=($( compgen -W '$( _yum_baseopts 2>/dev/null )' -- "$cur" )); > return 0; > fi; > COMPREPLY=($( compgen -f -o plusdirs -X "!*.spec" -- "$cur" )); > [[ $cur != */* && $cur != ~* ]] && _yum_list all "$cur" 2> /dev/null >} >_yu_debug_dump () >{ > COMPREPLY=(); > case $3 in > -h | --help) > return 0 > ;; > esac; > if [[ $2 == -* ]]; then > COMPREPLY=($( compgen -W '--help --norepos' -- "$2" )); > return 0; > fi; > COMPREPLY=($( compgen -f -o plusdirs -- "$cur" )) >} >_yu_debuginfo_install () >{ > local cur prev words=() split=false; > _yu_init_completion "$2" "$3"; > _yum_complete_baseopts "$cur" "$prev" && return 0; > $split && return 0; > if [[ $cur == -* ]]; then > COMPREPLY=($( compgen -W '$( _yum_baseopts 2>/dev/null ) > --no-debuginfo-plugin' -- "$cur" )); > return 0; > fi; > _yum_list all "$cur" >} >_yu_init_completion () >{ > if declare -F _get_comp_words_by_ref &>/dev/null; then > _get_comp_words_by_ref -n = cur prev words; > else > cur=$1 prev=$2 words=("${COMP_WORDS[@]}"); > fi; > declare -F _split_longopt &>/dev/null && _split_longopt && split=true >} >_yu_package_cleanup () >{ > local cur prev words=() split=false; > _yu_init_completion "$2" "$3"; > _yum_complete_baseopts "$cur" "$prev" 2> /dev/null && return 0; > case $prev in > --leaf-regex | --qf | --queryformat) > return 0 > ;; > --count) > COMPREPLY=($( compgen -W '1 2 3 4 5 6 7 8 9' -- "$cur" )); > return 0 > ;; > esac; > $split && return 0; > COMPREPLY=($( compgen -W '$( _yum_baseopts 2>/dev/null ) --problems > --queryformat --orphans --dupes --cleandupes --noscripts --leaves --all > --leaf-regex --exclude-devel --exclude-bin --oldkernels --count > --keepdevel' -- "$cur" )) >} >_yu_repo_graph () >{ > local cur prev words=() split=false; > _yu_init_completion "$2" "$3"; > case $prev in > -h | --help) > return 0 > ;; > --repoid) > _yum_helper repolist all "$cur" 2> /dev/null; > return 0 > ;; > -c) > COMPREPLY=($( compgen -f -o plusdirs -X '!*.conf' -- "$cur" )); > return 0 > ;; > esac; > $split && return 0; > COMPREPLY=($( compgen -W '--help --repoid -c' -- "$cur" )) >} >_yu_repo_rss () >{ > COMPREPLY=(); > case $3 in > -h | --help | -l | -t | -d | -r | -a) > return 0 > ;; > -f) > COMPREPLY=($( compgen -f -o plusdirs -X '!*.xml' -- "$cur" )); > return 0 > ;; > -c) > COMPREPLY=($( compgen -f -o plusdirs -X '!*.conf' -- "$cur" )); > return 0 > ;; > esac; > COMPREPLY=($( compgen -W '--help -f -l -t -d -r --tempcache -g -a -c' -- "$2" )); > [[ $2 == -* ]] || _yum_helper repolist all "$2" 2> /dev/null || return 0 >} >_yu_repoclosure () >{ > local cur prev words=() split=false; > _yu_init_completion "$2" "$3"; > case $prev in > -h | --help | -a | --arch | --basearch | --repofrompath) > return 0 > ;; > -c | --config) > COMPREPLY=($( compgen -f -o plusdirs -X '!*.conf' -- "$cur" )); > return 0 > ;; > -l | --lookaside | -r | --repoid) > _yum_helper repolist all "$cur" 2> /dev/null; > return 0 > ;; > -p | --pkg) > _yum_list all "$cur" 2> /dev/null; > return 0 > ;; > -g | --group) > _yum_helper groups list all "$cur" 2> /dev/null; > return 0 > ;; > esac; > $split && return 0; > COMPREPLY=($( compgen -W '--help --config --arch --basearch --builddeps > --lookaside --repoid --tempcache --quiet --newest --repofrompath --pkg > --group' -- "$cur" )) >} >_yu_repodiff () >{ > local cur prev words=() split=false; > _yu_init_completion "$2" "$3"; > case $prev in > -h | --help | --version | -n | --new | -o | --old | -a | --archlist) > return 0 > ;; > esac; > $split && return 0; > COMPREPLY=($( compgen -W '--version --help --new --old --quiet --archlist > --compare-arch --size --downgrade --simple' -- "$cur" )) >} >_yu_repomanage () >{ > local cur prev words=() split=false; > _yu_init_completion "$2" "$3"; > case $prev in > -h | --help) > return 0 > ;; > -k | --keep) > COMPREPLY=($( compgen -W '1 2 3 4 5 6 7 8 9' -- "$cur" )); > return 0 > ;; > esac; > $split && return 0; > if [[ $cur == -* ]]; then > COMPREPLY=($( compgen -W '--old --new --space --keep --nocheck > --help' -- "$cur" )); > return 0; > fi; > COMPREPLY=($( compgen -d -- "$cur" )) >} >_yu_repoquery () >{ > local cur prev words=() split=false; > _yu_init_completion "$2" "$3"; > local word groupmode=false; > for word in "${words[@]}"; > do > case $word in > -g | --group) > groupmode=true; > break > ;; > esac; > done; > case $prev in > -h | --help | --version | --qf | --queryformat | --archlist | --repofrompath | --setopt) > return 0 > ;; > -f | --file) > COMPREPLY=($( compgen -f -o plusdirs -- "$cur" )); > return 0 > ;; > -l | --list | -i | --info | -R | --requires) > if $groupmode; then > _yum_helper groups list all "$cur" 2> /dev/null; > else > declare -F _yum_atgroups &>/dev/null && _yum_atgroups "$cur" || _yum_list all "$cur" 2> /dev/null; > fi; > return 0 > ;; > --grouppkgs) > COMPREPLY=($( compgen -W 'all default optional mandatory' -- "$cur" )); > return 0 > ;; > --pkgnarrow) > COMPREPLY=($( compgen -W 'all available updates installed extras > obsoletes recent repos' -- "$cur" )); > return 0 > ;; > --repoid) > _yum_helper repolist all "$cur" 2> /dev/null; > return 0 > ;; > --enablerepo) > _yum_helper repolist disabled "$cur" 2> /dev/null; > return 0 > ;; > --disablerepo) > _yum_helper repolist enabled "$cur" 2> /dev/null; > return 0 > ;; > -c | --config) > COMPREPLY=($( compgen -f -o plusdirs -X '!*.conf' -- "$cur" )); > return 0 > ;; > --level) > COMPREPLY=($( compgen -W '{1..9} all' -- "$cur" )); > return 0 > ;; > --output) > COMPREPLY=($( compgen -W 'text ascii-tree dot-tree' -- "$cur" )); > return 0 > ;; > --search-fields) > COMPREPLY=($( compgen -W 'name summary description' -- "$cur" )); > return 0 > ;; > esac; > $split && return 0; > if [[ $cur == -* ]]; then > COMPREPLY=($( compgen -W '--version --help --list --info --file > --queryformat --groupmember --all --requires --provides --obsoletes > --conflicts --changelog --location --nevra --envra --nvr --source > --srpm --resolve --exactdeps --recursive --whatprovides > --whatrequires --whatobsoletes --whatconflicts --group --grouppkgs > --archlist --pkgnarrow --installed --show-duplicates --repoid > --enablerepo --disablerepo --repofrompath --plugins --quiet > --verbose --cache --tempcache --querytags --config --level --output > --search --search-fields --setopt' -- "$cur" )); > return 0; > fi; > declare -F _yum_atgroups &>/dev/null && _yum_atgroups "$cur" || _yum_list all "$cur" 2> /dev/null >} >_yu_verifytree () >{ > local cur prev words=() split=false; > _yu_init_completion "$2" "$3"; > case $prev in > -h | --help | -t | --testopia) > return 0 > ;; > esac; > $split && return 0; > if [[ $cur == -* ]]; then > COMPREPLY=($( compgen -W '--help --checkall --testopia --treeinfo' -- "$cur" )); > return 0; > fi; > COMPREPLY=($( compgen -d -- "$cur" )) >} >_yu_yumdb () >{ > local cur prev words=() split=false; > _yu_init_completion "$2" "$3"; > case $prev in > -h | --help | -version) > return 0 > ;; > -c | --config) > COMPREPLY=($( compgen -f -o plusdirs -X '!*.conf' -- "$cur" )); > return 0 > ;; > shell) > COMPREPLY=($( compgen -f -o plusdirs -- "$cur" )); > return 0 > ;; > esac; > $split && return 0; > if [ $COMP_CWORD -le 1 ]; then > COMPREPLY=($( compgen -W 'get set del rename rename-force copy search > exist unset info sync undeleted shell --version --help --noplugins > --config' -- "$cur" )); > fi >} >_yu_yumdownloader () >{ > local cur prev words=() split=false; > _yu_init_completion "$2" "$3"; > _yum_complete_baseopts "$cur" "$prev" 2> /dev/null && return 0; > case $prev in > --destdir) > COMPREPLY=($( compgen -d -- "$cur" )); > return 0 > ;; > --archlist) > return 0 > ;; > esac; > $split && return 0; > if [[ $cur == -* ]]; then > COMPREPLY=($( compgen -W '$( _yum_baseopts 2>/dev/null ) --destdir > --urls --resolve --source --archlist' -- "$cur" )); > return 0; > fi; > _yum_list all "$cur" >} >_yum () >{ > COMPREPLY=(); > local yum=$1 cur=$2 prev=$3 words=("${COMP_WORDS[@]}"); > declare -F _get_comp_words_by_ref &>/dev/null && _get_comp_words_by_ref -n = cur prev words; > local cmds=(check check-update clean deplist distro-sync downgrade groups help history info install list makecache provides reinstall remove repolist search shell update upgrade version); > local i c cmd subcmd; > for ((i=1; i < ${#words[@]}-1; i++ )) > do > [[ -n $cmd ]] && subcmd=${words[i]} && break; > for c in ${cmds[@]} check-rpmdb distribution-synchronization erase group groupinfo groupinstall grouplist groupremove groupupdate grouperase install-na localinstall localupdate whatprovides; > do > [[ ${words[i]} == $c ]] && cmd=$c && break; > done; > done; > case $cmd in > check | check-rpmdb) > COMPREPLY=($( compgen -W 'dependencies duplicates all' -- "$cur" )); > return 0 > ;; > check-update | makecache | provides | whatprovides | resolvedep | search) > return 0 > ;; > clean) > [[ $prev == $cmd ]] && COMPREPLY=($( compgen -W 'expire-cache packages headers > metadata cache dbcache all' -- "$cur" )); > return 0 > ;; > deplist) > COMPREPLY=($( compgen -f -o plusdirs -X '!*.[rs]pm' -- "$cur" )); > _yum_list all "$cur"; > return 0 > ;; > distro-sync | distribution-synchronization) > [[ $prev == $cmd ]] && COMPREPLY=($( compgen -W 'full different' -- "$cur" )); > _yum_list installed "$cur"; > return 0 > ;; > downgrade | reinstall) > if ! _yum_atgroups "$cur"; then > _yum_binrpmfiles "$cur"; > _yum_list installed "$cur"; > fi; > return 0 > ;; > erase | remove) > _yum_atgroups "$cur" || _yum_list installed "$cur"; > return 0 > ;; > group*) > if [[ ( $cmd == groups || $cmd == group ) && $prev == $cmd ]]; then > COMPREPLY=($( compgen -W 'info install list remove summary' -- "$cur" )); > else > _yum_helper groups list all "$cur"; > fi; > return 0 > ;; > help) > [[ $prev == $cmd ]] && COMPREPLY=($( compgen -W '${cmds[@]}' -- "$cur" )); > return 0 > ;; > history) > if [[ $prev == $cmd ]]; then > COMPREPLY=($( compgen -W 'info list packages-list > packages-info summary addon-info redo undo rollback new > sync stats' -- "$cur" )); > return 0; > fi; > case $subcmd in > undo | repeat | addon | addon-info | rollback) > if [[ $prev == $subcmd ]]; then > COMPREPLY=($( compgen -W "last" -- "$cur" )); > _yum_transactions; > fi > ;; > redo) > case $prev in > redo) > COMPREPLY=($( compgen -W "force-reinstall > force-remove last" -- "$cur" )); > _yum_transactions > ;; > reinstall | force-reinstall | remove | force-remove) > COMPREPLY=($( compgen -W "last" -- "$cur" )); > _yum_transactions > ;; > esac > ;; > package-list | pkg | pkgs | pkg-list | pkgs-list | package | packages | packages-list | pkg-info | pkgs-info | package-info | packages-info) > _yum_list available "$cur" > ;; > info | list | summary) > if [[ $subcmd != info ]]; then > COMPREPLY=($( compgen -W "all" -- "$cur" )); > [[ $cur != all ]] && _yum_list available "$cur"; > else > _yum_list available "$cur"; > fi; > _yum_transactions > ;; > sync | synchronize) > _yum_list installed "$cur" > ;; > esac; > return 0 > ;; > info) > _yum_list all "$cur"; > return 0 > ;; > install) > if ! _yum_atgroups "$cur"; then > _yum_binrpmfiles "$cur"; > _yum_list available "$cur"; > fi; > return 0 > ;; > install-na) > _yum_list available "$cur"; > return 0 > ;; > list) > [[ $prev == $cmd ]] && COMPREPLY=($( compgen -W 'all available updates installed > extras obsoletes recent' -- "$cur" )); > return 0 > ;; > localinstall | localupdate) > _yum_binrpmfiles "$cur"; > return 0 > ;; > repolist) > [[ $prev == $cmd ]] && COMPREPLY=($( compgen -W 'all enabled disabled' -- "$cur" )); > return 0 > ;; > shell) > [[ $prev == $cmd ]] && COMPREPLY=($( compgen -f -o plusdirs -- "$cur" )); > return 0 > ;; > update | upgrade) > if ! _yum_atgroups "$cur"; then > _yum_binrpmfiles "$cur"; > _yum_list updates "$cur"; > fi; > return 0 > ;; > version) > [[ $prev == $cmd ]] && COMPREPLY=($( compgen -W 'all installed available nogroups > grouplist groupinfo' -- "$cur" )); > return 0 > ;; > esac; > local split=false; > declare -F _split_longopt &>/dev/null && _split_longopt && split=true; > _yum_complete_baseopts "$cur" "$prev" && return 0; > $split && return 0; > if [[ $cur == -* ]]; then > COMPREPLY=($( compgen -W '$( _yum_baseopts )' -- "$cur" )); > return 0; > fi; > COMPREPLY=($( compgen -W '${cmds[@]}' -- "$cur" )) >} >_yum_atgroups () >{ > if [[ $1 == \@* ]]; then > _yum_helper groups list all "${1:1}"; > COMPREPLY=("${COMPREPLY[@]/#/@}"); > return 0; > fi; > return 1 >} >_yum_baseopts () >{ > local opts='--help --tolerant --cacheonly --config --randomwait > --debuglevel --showduplicates --errorlevel --rpmverbosity --quiet > --verbose --assumeyes --assumeno --version --installroot --enablerepo > --disablerepo --exclude --disableexcludes --obsoletes --noplugins > --nogpgcheck --skip-broken --color --releasever --setopt'; > [[ $COMP_LINE == *--noplugins* ]] || opts+=" --disableplugin --enableplugin"; > printf %s "$opts" >} >_yum_binrpmfiles () >{ > COMPREPLY+=($( compgen -f -o plusdirs -X '!*.rpm' -- "$1" )); > COMPREPLY=($( compgen -W '"${COMPREPLY[@]}"' -X '*.src.rpm' )); > COMPREPLY=($( compgen -W '"${COMPREPLY[@]}"' -X '*.nosrc.rpm' )) >} >_yum_complete_baseopts () >{ > case $2 in > -d | --debuglevel | -e | --errorlevel) > COMPREPLY=($( compgen -W '0 1 2 3 4 5 6 7 8 9 10' -- "$1" )); > return 0 > ;; > --rpmverbosity) > COMPREPLY=($( compgen -W 'info critical emergency error warn > debug' -- "$1" )); > return 0 > ;; > -c | --config) > COMPREPLY=($( compgen -f -o plusdirs -X "!*.conf" -- "$1" )); > return 0 > ;; > --installroot | --downloaddir) > COMPREPLY=($( compgen -d -- "$1" )); > return 0 > ;; > --enablerepo) > _yum_helper repolist disabled "$1"; > return 0 > ;; > --disablerepo) > _yum_helper repolist enabled "$1"; > return 0 > ;; > --disableexcludes) > _yum_helper repolist all "$1"; > COMPREPLY=($( compgen -W '${COMPREPLY[@]} all main' -- "$1" )); > return 0 > ;; > --enableplugin) > _yum_plugins 0 "$1"; > return 0 > ;; > --disableplugin) > _yum_plugins 1 "$1"; > return 0 > ;; > --color) > COMPREPLY=($( compgen -W 'always auto never' -- "$1" )); > return 0 > ;; > -R | --randomwait | -x | --exclude | -h | --help | --version | --releasever | --cve | --bz | --advisory | --tmprepo | --verify-filenames | --setopt) > return 0 > ;; > --download-order) > COMPREPLY=($( compgen -W 'default smallestfirst largestfirst' -- "$1" )); > return 0 > ;; > --override-protection) > _yum_list installed "$1"; > return 0 > ;; > --verify-configuration-files) > COMPREPLY=($( compgen -W '1 0' -- "$1" )); > return 0 > ;; > esac; > return 1 >} >_yum_helper () >{ > local IFS=' >'; > COMPREPLY+=($( > /usr/share/yum-cli/completion-helper.py -d 0 -C "$@" 2>/dev/null )) >} >_yum_list () >{ > [[ $2 == */* || $2 == [.~]* ]] && return; > _yum_helper list "$@" >} >_yum_plugins () >{ > local val; > [[ $1 -eq 1 ]] && val='\(1\|yes\|true\|on\)' || val='\(0\|no\|false\|off\)'; > COMPREPLY+=($( compgen -W '$( command grep -il "^\s*enabled\s*=\s*$val" \ > /etc/yum/pluginconf.d/*.conf 2>/dev/null \ > | sed -ne "s|^.*/\([^/]\{1,\}\)\.conf$|\1|p" )' -- "$2" )) >} >_yum_transactions () >{ > COMPREPLY+=($( compgen -W "$( $yum -d 0 -C history 2>/dev/null | sed -ne 's/^[[:space:]]*\([0-9]\{1,\}\).*/\1/p' )" -- "$cur" )) >} >command_not_found_handle () >{ > runcnf=1; > retval=127; > [ ! -S /var/run/dbus/system_bus_socket ] && runcnf=0; > [ ! -x /usr/libexec/packagekitd ] && runcnf=0; > if [ $runcnf -eq 1 ]; then > /usr/libexec/pk-command-not-found $@; > retval=$?; > else > echo "bash: $1: command not found"; > fi; > return $retval >} >dequote () >{ > eval printf %s "$1" 2> /dev/null >} >quote () >{ > local quoted=${1//\'/\'\\\'\'}; > printf "'%s'" "$quoted" >} >quote_readline () >{ > local quoted; > _quote_readline_by_ref "$1" ret; > printf %s "$ret" >}
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 831853
: 591647