ALSA_CONFIG_PATH=/etc/alsa-pulse.conf AUDIODRIVER=pulseaudio BASH=/bin/bash BASHOPTS=checkwinsize:cmdhist:expand_aliases:extquote:force_fignore:histappend:hostcomplete:interactive_comments:progcomp:promptvars:sourcepath BASH_ALIASES=() BASH_ARGC=() BASH_ARGV=() BASH_CMDS=() BASH_LINENO=() BASH_SOURCE=() BASH_VERSINFO=([0]="4" [1]="2" [2]="45" [3]="1" [4]="release" [5]="x86_64-suse-linux-gnu") BASH_VERSION='4.2.45(1)-release' CLASSPATH=.:/usr/java/jdk1.8.0_11/lib/dt.jar:/usr/java/jdk1.8.0_11/lib/tools.jar:/usr/java/jdk1.8.0_11/jre/lib COLORFGBG='15;0' COLORTERM=1 COLUMNS=149 CPU=x86_64 CSHEDIT=emacs DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-AyRBggnHrV,guid=708dbfa79bdd8c746851192d53ddccb8 DESKTOP_SESSION=default DIRSTACK=() DISPLAY=:0 DM_CONTROL=/var/run/xdmctl EUID=1000 FROM_HEADER= GPG_TTY=/dev/pts/1 GROUPS=() GS_LIB=/home/wuhaixing/.fonts GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/wuhaixing/.gtkrc-2.0:/home/wuhaixing/.kde4/share/config/gtkrc-2.0 GTK3_IM_MODULE=fcitx GTK_IM_MODULE=fcitx GTK_MODULES=canberra-gtk-module GTK_RC_FILES=/etc/gtk/gtkrc:/home/wuhaixing/.gtkrc:/home/wuhaixing/.kde4/share/config/gtkrc G_BROKEN_FILENAMES=1 G_FILENAME_ENCODING=@locale,UTF-8,GB2312,GB18030,GBK,ISO-8859-1 HISTCONTROL=ignoreboth HISTFILE=/home/wuhaixing/.bash_history HISTFILESIZE=1000 HISTSIZE=1000 HOME=/home/wuhaixing HOST=linux-2fy0 HOSTFILE= HOSTNAME=linux-2fy0 HOSTTYPE=x86_64 IFS=$' \t\n' INPUTRC=/home/wuhaixing/.inputrc JAVA_BINDIR=/usr/java/latest/bin JAVA_HOME=/usr/java/jdk1.8.0_11 JAVA_ROOT=/usr/java/latest JDK_HOME=/usr/java/latest JRE_HOME=/usr/java/jdk1.8.0_11/jre KDE_FULL_SESSION=true KDE_MULTIHEAD=false KDE_SESSION_UID=1000 KDE_SESSION_VERSION=4 KONSOLE_DBUS_SERVICE=:1.152 KONSOLE_DBUS_SESSION=/Sessions/1 KONSOLE_DBUS_WINDOW=/Windows/1 KONSOLE_PROFILE_NAME=Shell LANG=zh_CN.UTF-8 LANGUAGE= LESS='-M -I -R' LESSCLOSE='lessclose.sh %s %s' LESSKEY=/etc/lesskey.bin LESSOPEN='lessopen.sh %s' LESS_ADVANCED_PREPROCESSOR=no LINES=37 LOGNAME=wuhaixing LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.xz=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:' LS_OPTIONS='-N --color=tty -T 0' MACHTYPE=x86_64-suse-linux MAIL=/var/spool/mail/wuhaixing MAILCHECK=60 MANPATH=/usr/local/man:/usr/share/man MAN_KEEP_FORMATTING=yes MINICOM='-c on' MORE=-sl NNTPSERVER=news OPTERR=1 OPTIND=1 OSTYPE=linux PAGER=less PATH=/home/wuhaixing/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/java/jdk1.8.0_11/bin:/usr/java/jdk1.8.0_11/jre/bin PIPESTATUS=([0]="0") PPID=28704 PROFILEHOME= PROFILEREAD=true PS1='\[$(ppwd)\]\u@\h:\w> ' PS2='> ' PS4='+ ' PWD=/home/wuhaixing PYTHONSTARTUP=/etc/pythonstart QEMU_AUDIO_DRV=pa QT4_IM_MODULE=fcitx QT_IM_MODULE=fcitx QT_IM_SWITCHER=imsw-multi QT_PLUGIN_PATH=/home/wuhaixing/.kde4/lib64/kde4/plugins/:/usr/lib64/kde4/plugins/ QT_SYSTEM_DIR=/usr/share/desktop-data SDK_HOME=/usr/java/latest SDL_AUDIODRIVER=pulse SESSION_MANAGER=local/linux-2fy0.site:@/tmp/.ICE-unix/1343,unix/linux-2fy0.site:/tmp/.ICE-unix/1343 SHELL=/bin/bash SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor SHELL_SESSION_ID=7ff37f5a558b4000953041a50837bab8 SHLVL=2 TERM=xterm TMPDIR=/tmp TS1=$'\E7\E]2;%s@%s:%s\a\E]1;%s\a\E8' UID=1000 USER=wuhaixing USE_FAM= WINDOWID=44040218 WINDOWMANAGER=/usr/bin/startkde WINDOWPATH=7 XAUTHLOCALHOSTNAME=linux-2fy0 XCURSOR_THEME=Oxygen_White XDG_CONFIG_DIRS=/etc/xdg XDG_CURRENT_DESKTOP=KDE XDG_DATA_DIRS=/usr/share:/usr/share XDG_RUNTIME_DIR=/run/user/1000 XDG_SEAT=seat0 XDG_SESSION_ID=1 XDG_VTNR=7 XDM_MANAGED=method=classic,auto XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB XMODIFIERS=@im=fcitx XNLSPATH=/usr/share/X11/nls XSESSION_IS_UP=yes YAST=/sbin/yast YAST_MODLIST=() _=set _isl=$'\E]1;' _mkdr='-o nospace -o dirnames' e=declare is=bash o=1 s=declare __all_modules () { while read name; do name=${name%% *}; printf "%s\n" "$name"; done < <(pulseaudio --dump-modules 2> /dev/null) } __cards () { while IFS=' ' read idx name _; do printf "%s %s\n" "$idx" "$name"; done < <(pactl list cards short 2> /dev/null) } __dbus_send () { local IFS=' '; local cur="${COMP_WORDS[COMP_CWORD]}"; if [[ "$cur" == *=* ]]; then cur=${cur/*=/}; fi; COMPREPLY=($(compgen -W "$(/usr/lib/dbus-1-glib/dbus-bash-completion-helper dbus-send ${COMP_WORDS[@]:0})" -- $cur)) } __loaded_modules () { while IFS=' ' read idx name _; do printf "%s %s\n" "$idx" "$name"; done < <(pactl list modules short 2> /dev/null) } __ports () { pactl list cards 2> /dev/null | awk -e '/^\tPorts:/ { flag=1; next } /^\t[A-Za-z]/ { flag=0 } flag { if (/^\t\t[A-Za-z]/) ports = ports substr($0, 3, index($0, ":")-3) " " } END { print ports }' } __profiles () { pactl list cards 2> /dev/null | awk -e '/^\tProfiles:/ { flag=1; next } /^\t[A-Za-z]/ { flag=0 } flag { if (/^\t\t[A-Za-z]/) profiles = profiles substr($0, 3, index($0, ": ")-3) " " } END { print profiles }' } __resample_methods () { while read name; do printf "%s\n" "$name"; done < <(pulseaudio --dump-resample-methods 2> /dev/null) } __sink_inputs () { while IFS=' ' read idx _ _ _ _; do printf "%s\n" "$idx"; done < <(pactl list sink-inputs short 2> /dev/null) } __sinks () { while IFS=' ' read _ name _ _ _; do printf "%s\n" "$name"; done < <(pactl list sinks short 2> /dev/null) } __sinks_idx () { while IFS=' ' read idx _ _ _ _; do printf "%s\n" "$idx"; done < <(pactl list sinks short 2> /dev/null) } __source_outputs () { while IFS=' ' read idx _ _ _ _; do printf "%s\n" "$idx"; done < <(pactl list source-outputs short 2> /dev/null) } __sources () { while IFS=' ' read _ name _ _ _; do printf "%s\n" "$name"; done < <(pactl list sources short 2> /dev/null) } _cd_ () { local c=${COMP_WORDS[COMP_CWORD]}; local s x; local IFS=' '; local -i glob=0; local -i isdir=0; local -i cdpath=0; local -i quoted=0; if [[ "${c:0:1}" == '"' ]]; then let quoted++; compopt -o plusdirs; fi; shopt -q extglob && let glob++; ((glob == 0)) && shopt -s extglob; if [[ $COMP_WORDBREAKS =~ : && $COMP_LINE =~ : ]]; then compopt +o plusdirs; if ((COMP_CWORD > 1)); then IFS="${COMP_WORDBREAKS//:}"; COMP_WORDS=($COMP_LINE); let COMP_CWORD=${#COMP_WORDS[@]}-1; c=${COMP_WORDS[COMP_CWORD]}; IFS=' '; fi; fi; case "${1##*/}" in mkdir) ;; cd | pushd) s="-S/"; [[ "$c" =~ ^\..* ]] || let cdpath++ ;; *) s="-S/" ;; esac; case "$c" in *[*?[]*) COMPREPLY=(); ((cdpath == 0)) || _cdpath_ "$c"; ((glob == 0)) && shopt -u extglob; return 0 ;; \$\(*\)) eval COMPREPLY=\(${c}\); compopt +o plusdirs ;; \$\(*) COMPREPLY=($(compgen -c -P '$(' -S ')' -- ${c#??})); if ((${#COMPREPLY[@]} > 0)); then compopt +o plusdirs; let isdir++; fi ;; \`*\`) eval COMPREPLY=\(${c}\); compopt +o plusdirs ;; \`*) COMPREPLY=($(compgen -c -P '\`' -S '\`' -- ${c#?})); if ((${#COMPREPLY[@]} > 0)); then compopt +o plusdirs; let isdir++; fi ;; \$\{*\}) eval COMPREPLY=\(${c}\) ;; \$\{*) COMPREPLY=($(compgen -v -P '${' -S '}' -- ${c#??})); if ((${#COMPREPLY[@]} > 0)); then compopt +o plusdirs; if ((${#COMPREPLY[@]} > 1)); then ((cdpath == 0)) || _cdpath_ "$c"; ((glob == 0)) && shopt -u extglob; return 0; fi; let isdir++; eval COMPREPLY=\(${COMPREPLY[@]}\); fi ;; \$*) COMPREPLY=($(compgen -v -P '$' $s -- ${c#?})); if ((${#COMPREPLY[@]} > 0)); then compopt +o plusdirs; if ((${#COMPREPLY[@]} > 1)); then ((cdpath == 0)) || _cdpath_ "$c"; ((glob == 0)) && shopt -u extglob; return 0; fi; let isdir++; eval COMPREPLY=\(${COMPREPLY[@]}\); fi ;; \~*/*) COMPREPLY=($(compgen -d $s +o plusdirs -- "${c}")); if ((${#COMPREPLY[@]} > 0)); then compopt +o plusdirs; let isdir++; fi ;; \~*) COMPREPLY=($(compgen -u $s -- "${c}")); if ((${#COMPREPLY[@]} > 0)); then compopt +o plusdirs; let isdir++; fi ;; *\:*) if [[ $COMP_WORDBREAKS =~ : ]]; then x=${c%"${c##*[^\\]:}"}; COMPREPLY=($(compgen -d $s +o plusdirs -- "${c}")); COMPREPLY=(${COMPREPLY[@]#"$x"}); ((${#COMPREPLY[@]} == 0)) || let isdir++; fi; ((cdpath == 0)) || _cdpath_ "$c"; ((glob == 0)) && shopt -u extglob; return 0 ;; *) COMPREPLY=(); ((cdpath == 0)) || _cdpath_ "$c"; ((glob == 0)) && shopt -u extglob; return 0 ;; esac; if test ${#COMPREPLY[@]} -gt 0; then _cdpath_ "$c"; ((${#COMPREPLY[@]} == 0)) || let isdir++; fi; ((quoted)) || _compreply_ $isdir; ((glob == 0)) && shopt -u extglob; return 0 } _cdpath_ () { local -i o; local c="$1"; local x="$(bind -v | sed -rn 's/set (mark-)/\1/p')"; local dir=$([[ $x =~ mark-directories+([[:space:]])on ]] && echo on); local sym=$([[ $x =~ mark-symlinked-directories+([[:space:]])on ]] && echo on); for x in ${CDPATH//:/' '}; do o=${#COMPREPLY[@]}; for s in $(compgen -d +o plusdirs $x/$c); do if [[ ( ( $sym == on && -h $s ) || ( $dir == on && ! -h $s ) ) && ! -d ${s#$x/} ]]; then s="${s}/"; fi; COMPREPLY[o++]=${s#$x/}; done; done } _completion_loader () { local dir=/usr/share/bash-completion/completions; local cmd="${1##*/}"; . "${dir}/${cmd}" &>/dev/null && return 124; complete -o default -o bashdefault "${cmd}" &>/dev/null && return 124 } _compreply_ () { local IFS=' '; local s x; local -i o; local -i isdir=$1; test ${#COMPREPLY[@]} -eq 0 && return 0; for ((o=0; o < ${#COMPREPLY[@]}; o++)) do if test ! -d "${COMPREPLY[$o]}"; then ((isdir == 0)) || continue; COMPREPLY[$o]="${COMPREPLY[$o]%%/}"; continue; fi; COMPREPLY[$o]="${COMPREPLY[$o]%%/}/"; done; if test ${#COMPREPLY[@]} -eq 1; then eval x="${COMPREPLY[@]}"; if test -d "$x"; then compopt -o plusdirs; compopt +o nospace; else compopt -o nospace; fi; fi; s="${COMP_WORDBREAKS//[: ]}"; s="${s// }"; s="${s//[\{\}()\[\]]}"; s="${s} (){}[]\`\$"; o=${#s}; while test $((o--)) -gt 0; do x="${s:${o}:1}"; case "$x" in \() COMPREPLY=($(echo "${COMPREPLY[*]}"|command sed -r 's/\(/\\\(/g')) ;; *) COMPREPLY=(${COMPREPLY[*]//${x}/\\${x}}) ;; esac; done } _exp_ () { local c=${COMP_WORDS[COMP_CWORD]}; local a="${COMP_LINE}"; local e s cd dc t=""; local -i o; local -i glob=0; local -i quoted=0; local IFS; if [[ "${c:0:1}" == '"' ]]; then let quoted++; compopt -o plusdirs; fi; shopt -q extglob && let glob++; ((glob == 0)) && shopt -s extglob; cd='*-?(c)d*'; dc='*-d?(c)*'; case "${1##*/}" in compress) e='*.Z' ;; bzip2) case "$c" in -) COMPREPLY=(d c); ((glob == 0)) && shopt -u extglob; return 0 ;; -? | -??) COMPREPLY=($c); ((glob == 0)) && shopt -u extglob; return 0 ;; esac; case "$a" in $cd | $dc) e='!*.+(*)'; t='@(bzip2 compressed)*' ;; *) e='*.bz2' ;; esac ;; bunzip2) e='!*.+(*)'; t='@(bzip2 compressed)*' ;; gzip) case "$c" in -) COMPREPLY=(d c); ((glob == 0)) && shopt -u extglob; return 0 ;; -? | -??) COMPREPLY=($c); ((glob == 0)) && shopt -u extglob; return 0 ;; esac; case "$a" in $cd | $dc) e='!*.+(*)'; t='@(gzip compressed|*data 16 bits)*' ;; *) e='*.+(gz|tgz|z|Z)' ;; esac ;; gunzip) e='!*.+(*)'; t='@(gzip compressed|*data 16 bits)*' ;; lzma) case "$c" in -) COMPREPLY=(d c); ((glob == 0)) && shopt -u extglob; return 0 ;; -? | -??) COMPREPLY=($c); ((glob == 0)) && shopt -u extglob; return 0 ;; esac; case "$a" in $cd | $dc) e='!*.+(lzma)' ;; *) e='*.+(lzma)' ;; esac ;; unlzma) e='!*.+(lzma)' ;; xz) case "$c" in -) COMPREPLY=(d c); ((glob == 0)) && shopt -u extglob; return 0 ;; -? | -??) COMPREPLY=($c); ((glob == 0)) && shopt -u extglob; return 0 ;; esac; case "$a" in $cd | $dc) e='!*.+(xz)' ;; *) e='*.+(xz)' ;; esac ;; unxz) e='!*.+(xz)' ;; uncompress) e='!*.Z' ;; unzip) e='!*.+(*)'; t="@(MS-DOS executable|Zip archive)*" ;; gs | ghostview) e='!*.+(eps|EPS|ps|PS|pdf|PDF)' ;; gv | kghostview) e='!*.+(eps|EPS|ps|PS|ps.gz|pdf|PDF)' ;; acroread | [xk]pdf) e='!*.+(fdf|pdf|FDF|PDF)' ;; evince) e='!*.+(ps|PS|pdf|PDF)' ;; dvips) e='!*.+(dvi|DVI)' ;; rpm | zypper) e='!*.+(rpm|you)' ;; [xk]dvi) e='!*.+(dvi|dvi.gz|DVI|DVI.gz)' ;; tex | latex | pdflatex) e='!*.+(tex|TEX|texi|latex)' ;; export) case "$a" in *=*) c=${c#*=} ;; *) COMPREPLY=($(compgen -v -- ${c})); ((glob == 0)) && shopt -u extglob; return 0 ;; esac ;; *) e='!*' ;; esac; case "$(complete -p ${1##*/} 2> /dev/null)" in *-d*) ;; *) s="-S/" ;; esac; IFS=' '; case "$c" in \$\(*\)) eval COMPREPLY=\(${c}\) ;; \$\(*) COMPREPLY=($(compgen -c -P '$(' -S ')' -- ${c#??})) ;; \`*\`) eval COMPREPLY=\(${c}\) ;; \`*) COMPREPLY=($(compgen -c -P '\`' -S '\`' -- ${c#?})) ;; \$\{*\}) eval COMPREPLY=\(${c}\) ;; \$\{*) COMPREPLY=($(compgen -v -P '${' -S '}' -- ${c#??})) ;; \$*) COMPREPLY=($(compgen -v -P '$' -- ${c#?})) ;; \~*/*) COMPREPLY=($(compgen -f -X "$e" +o plusdirs -- ${c})) ;; \~*) COMPREPLY=($(compgen -u ${s} -- ${c})) ;; *@*) COMPREPLY=($(compgen -A hostname -P '@' -S ':' -- ${c#*@})) ;; *[*?[]*) COMPREPLY=(); ((glob == 0)) && shopt -u extglob; return 0 ;; *[?*+\!@]\(*\)*) if ((glob == 0)); then COMPREPLY=($(compgen -f -X "$e" -- $c)); ((glob == 0)) && shopt -u extglob; return 0; fi; COMPREPLY=($(compgen -G "${c}")) ;; *) if test "$c" = ".."; then COMPREPLY=($(compgen -d -X "$e" ${_nosp} +o plusdirs -- $c)); else COMPREPLY=($(compgen -f -X "$e" +o plusdirs -- $c)); fi ;; esac; if test -n "$t"; then let o=0; local -a reply=(); ((quoted)) || _compreply_; for s in ${COMPREPLY[@]}; do e=$(eval echo $s); if test -d "$e"; then reply[$((o++))]="$s"; continue; fi; case "$(file -b $e 2> /dev/null)" in $t) reply[$((o++))]="$s" ;; esac; done; COMPREPLY=(${reply[@]}); ((glob == 0)) && shopt -u extglob; return 0; fi; ((quoted)) || _compreply_; ((glob == 0)) && shopt -u extglob; return 0 } _gdb_ () { local c=${COMP_WORDS[COMP_CWORD]}; local e p; local -i o; local IFS; local -i quoted=0; if [[ "${c:0:1}" == '"' ]]; then let quoted++; compopt -o plusdirs; fi; if test $COMP_CWORD -eq 1; then case "$c" in -*) COMPREPLY=($(compgen -W '-args -tty -s -e -se -c -x -d' -- "$c")) ;; *) COMPREPLY=($(compgen -c -- "$c")) ;; esac; return 0; fi; p=${COMP_WORDS[COMP_CWORD-1]}; IFS=' '; case "$p" in -args) COMPREPLY=($(compgen -c -- "$c")) ;; -tty) COMPREPLY=(/dev/tty* /dev/pts/*); COMPREPLY=($(compgen -W "${COMPREPLY[*]}" -- "$c")) ;; -s | e | -se) COMPREPLY=($(compgen -f -- "$c")) ;; -c | -x) COMPREPLY=($(compgen -f -- "$c")) ;; -d) COMPREPLY=($(compgen -d ${_nosp} +o plusdirs -- "$c")) ;; *) if test -z "$c"; then COMPREPLY=($(command ps axho comm,pid | command sed -rn "\@^${p##*/}@{ s@.*[[:blank:]]+@@p; }")); else COMPREPLY=(); fi; let o=${#COMPREPLY[*]}; ((quoted)) || _compreply_; for s in $(compgen -f -- "$c"); do e=$(eval echo $s); if test -d "$e"; then COMPREPLY[$((o++))]="$s"; continue; fi; case "$(file -b $e 2> /dev/null)" in *) COMPREPLY[$((o++))]="$s" ;; esac; done ;; esac; return 0 } _loexp_ () { local c=${COMP_WORDS[COMP_CWORD]}; local a="${COMP_LINE}"; local e s g=0 cd dc t=""; local IFS; shopt -q extglob && g=1; test $g -eq 0 && shopt -s extglob; cd='*-?(c)d*'; dc='*-d?(c)*'; case "${1##*/}" in localc) e='!*.+(sxc|SXC|stc|STC|dif|DIF|dbf|DBF|xls|XLS|xlw|XLW|xlt|XLT|rtf|RTF|sdc|SDC|vor|VOR|slk|SLK|txt|TXT|htm|HTM|html|HTML|wk1|WK1|wks|WKS|123|123|xml|XML|ods|ODS|ots|OTS|fods|FODS|csv|CSV|xlsb|XLSB|xlsm|XLSM|xlsx|XLSX|xltm|XLTM|xltx|XLTX)' ;; lowriter) e='!*.+(doc|DOC|dot|DOT|rtf|RTF|sxw|SXW|stw|STW|sdw|SDW|vor|VOR|txt|TXT|htm?|HTM?|xml|XML|wp|WP|wpd|WPD|wps|WPS|odt|ODT|ott|OTT|fodt|FODT|docm|DOCM|docx|DOCX|dotm|DOTM|dotx|DOTX|sxg|SXG|odm|ODM|sgl|SGL)' ;; unopkg) e='!*.+(oxt|OXT)' ;; lobase) e='!*.+(odb|ODB)' ;; libreoffice) e='!*.+(sxd|SXD|std|STD|dxf|DXF|emf|EMF|eps|EPS|met|MET|pct|PCT|sgf|SGF|sgv|SGV|sda|SDA|sdd|SDD|vor|VOR|svm|SVM|wmf|WMF|bmp|BMP|gif|GIF|jpg|JPG|jpeg|JPEG|jfif|JFIF|fif|FIF|jpe|JPE|pcd|PCD|pcx|PCX|pgm|PGM|png|PNG|ppm|PPM|psd|PSD|ras|RAS|tga|TGA|tif|TIF|tiff|TIFF|xbm|XBM|xpm|XPM|odg|ODG|otg|OTG|fodg|FODG|odc|ODC|odi|ODI|sds|SDS|wpg|WPG|svg|SVG|doc|DOC|dot|DOT|rtf|RTF|sxw|SXW|stw|STW|sdw|SDW|vor|VOR|txt|TXT|htm?|HTM?|xml|XML|wp|WP|wpd|WPD|wps|WPS|odt|ODT|ott|OTT|fodt|FODT|docm|DOCM|docx|DOCX|dotm|DOTM|dotx|DOTX|sxm|SXM|smf|SMF|mml|MML|odf|ODF|sxi|SXI|sti|STI|ppt|PPT|pps|PPS|pot|POT|sxd|SXD|sda|SDA|sdd|SDD|sdp|SDP|vor|VOR|cgm|CGM|odp|ODP|otp|OTP|fodp|FODP|ppsm|PPSM|ppsx|PPSX|pptm|PPTM|pptx|PPTX|potm|POTM|potx|POTX|odb|ODB|sxc|SXC|stc|STC|dif|DIF|dbf|DBF|xls|XLS|xlw|XLW|xlt|XLT|rtf|RTF|sdc|SDC|vor|VOR|slk|SLK|txt|TXT|htm|HTM|html|HTML|wk1|WK1|wks|WKS|123|123|xml|XML|ods|ODS|ots|OTS|fods|FODS|csv|CSV|xlsb|XLSB|xlsm|XLSM|xlsx|XLSX|xltm|XLTM|xltx|XLTX|sxg|SXG|odm|ODM|sgl|SGL|stw|STW|dot|DOT|vor|VOR|stc|STC|xlt|XLT|sti|STI|pot|POT|std|STD|stw|STW|dotm|DOTM|dotx|DOTX|potm|POTM|potx|POTX|xltm|XLTM|xltx|XLTX|htm|HTM|html|HTML|stw|STW|txt|TXT|vor|VOR|oth|OTH)' ;; loweb) e='!*.+(htm|HTM|html|HTML|stw|STW|txt|TXT|vor|VOR|oth|OTH)' ;; lofromtemplate) e='!*.+(stw|STW|dot|DOT|vor|VOR|stc|STC|xlt|XLT|sti|STI|pot|POT|std|STD|stw|STW|dotm|DOTM|dotx|DOTX|potm|POTM|potx|POTX|xltm|XLTM|xltx|XLTX)' ;; lomath) e='!*.+(sxm|SXM|smf|SMF|mml|MML|odf|ODF)' ;; loffice) e='!*.+(sxd|SXD|std|STD|dxf|DXF|emf|EMF|eps|EPS|met|MET|pct|PCT|sgf|SGF|sgv|SGV|sda|SDA|sdd|SDD|vor|VOR|svm|SVM|wmf|WMF|bmp|BMP|gif|GIF|jpg|JPG|jpeg|JPEG|jfif|JFIF|fif|FIF|jpe|JPE|pcd|PCD|pcx|PCX|pgm|PGM|png|PNG|ppm|PPM|psd|PSD|ras|RAS|tga|TGA|tif|TIF|tiff|TIFF|xbm|XBM|xpm|XPM|odg|ODG|otg|OTG|fodg|FODG|odc|ODC|odi|ODI|sds|SDS|wpg|WPG|svg|SVG|doc|DOC|dot|DOT|rtf|RTF|sxw|SXW|stw|STW|sdw|SDW|vor|VOR|txt|TXT|htm?|HTM?|xml|XML|wp|WP|wpd|WPD|wps|WPS|odt|ODT|ott|OTT|fodt|FODT|docm|DOCM|docx|DOCX|dotm|DOTM|dotx|DOTX|sxm|SXM|smf|SMF|mml|MML|odf|ODF|sxi|SXI|sti|STI|ppt|PPT|pps|PPS|pot|POT|sxd|SXD|sda|SDA|sdd|SDD|sdp|SDP|vor|VOR|cgm|CGM|odp|ODP|otp|OTP|fodp|FODP|ppsm|PPSM|ppsx|PPSX|pptm|PPTM|pptx|PPTX|potm|POTM|potx|POTX|odb|ODB|sxc|SXC|stc|STC|dif|DIF|dbf|DBF|xls|XLS|xlw|XLW|xlt|XLT|rtf|RTF|sdc|SDC|vor|VOR|slk|SLK|txt|TXT|htm|HTM|html|HTML|wk1|WK1|wks|WKS|123|123|xml|XML|ods|ODS|ots|OTS|fods|FODS|csv|CSV|xlsb|XLSB|xlsm|XLSM|xlsx|XLSX|xltm|XLTM|xltx|XLTX|sxg|SXG|odm|ODM|sgl|SGL|stw|STW|dot|DOT|vor|VOR|stc|STC|xlt|XLT|sti|STI|pot|POT|std|STD|stw|STW|dotm|DOTM|dotx|DOTX|potm|POTM|potx|POTX|xltm|XLTM|xltx|XLTX|htm|HTM|html|HTML|stw|STW|txt|TXT|vor|VOR|oth|OTH)' ;; lodraw) e='!*.+(sxd|SXD|std|STD|dxf|DXF|emf|EMF|eps|EPS|met|MET|pct|PCT|sgf|SGF|sgv|SGV|sda|SDA|sdd|SDD|vor|VOR|svm|SVM|wmf|WMF|bmp|BMP|gif|GIF|jpg|JPG|jpeg|JPEG|jfif|JFIF|fif|FIF|jpe|JPE|pcd|PCD|pcx|PCX|pgm|PGM|png|PNG|ppm|PPM|psd|PSD|ras|RAS|tga|TGA|tif|TIF|tiff|TIFF|xbm|XBM|xpm|XPM|odg|ODG|otg|OTG|fodg|FODG|odc|ODC|odi|ODI|sds|SDS|wpg|WPG|svg|SVG)' ;; loimpress) e='!*.+(sxi|SXI|sti|STI|ppt|PPT|pps|PPS|pot|POT|sxd|SXD|sda|SDA|sdd|SDD|sdp|SDP|vor|VOR|cgm|CGM|odp|ODP|otp|OTP|fodp|FODP|ppsm|PPSM|ppsx|PPSX|pptm|PPTM|pptx|PPTX|potm|POTM|potx|POTX)' ;; *) e='!*' ;; esac; case "$(complete -p ${1##*/} 2> /dev/null)" in *-d*) ;; *) s="-S/" ;; esac; IFS=' '; case "$c" in \$\(*\)) eval COMPREPLY=\(${c}\) ;; \$\(*) COMPREPLY=($(compgen -c -P '$(' -S ')' -- ${c#??})) ;; \`*\`) eval COMPREPLY=\(${c}\) ;; \`*) COMPREPLY=($(compgen -c -P '\`' -S '\`' -- ${c#?})) ;; \$\{*\}) eval COMPREPLY=\(${c}\) ;; \$\{*) COMPREPLY=($(compgen -v -P '${' -S '}' -- ${c#??})) ;; \$*) COMPREPLY=($(compgen -v -P '$' -- ${c#?})) ;; \~*/*) COMPREPLY=($(compgen -f -X "$e" -- ${c})) ;; \~*) COMPREPLY=($(compgen -u ${s} -- ${c})) ;; *@*) COMPREPLY=($(compgen -A hostname -P '@' -S ':' -- ${c#*@})) ;; *[*?[]*) COMPREPLY=($(compgen -G "${c}")) ;; *[?*+\!@]\(*\)*) if test $g -eq 0; then COMPREPLY=($(compgen -f -X "$e" -- $c)); test $g -eq 0 && shopt -u extglob; return; fi; COMPREPLY=($(compgen -G "${c}")) ;; *) if test "$c" = ".."; then COMPREPLY=($(compgen -d -X "$e" -S / ${_nosp} -- $c)); else for s in $(compgen -f -X "$e" -- $c); do if test -d $s; then COMPREPLY=(${COMPREPLY[@]} $(compgen -f -X "$e" -S / -- $s)); else if test -z "$t"; then COMPREPLY=(${COMPREPLY[@]} $s); else case "$(file -b $s 2> /dev/null)" in $t) COMPREPLY=(${COMPREPLY[@]} $s) ;; esac; fi; fi; done; fi ;; esac; test $g -eq 0 && shopt -u extglob } _ls () { local IFS=' '; command ls $LS_OPTIONS ${1+"$@"} } _ls_ () { local c=${COMP_WORDS[COMP_CWORD]}; local IFS=' '; local s x; local -i glob=0; local -i isdir=0; local -i quoted=0; local -i variable=0; if [[ "${c:0:1}" == '"' ]]; then let quoted++; compopt -o plusdirs; fi; if [[ "${c:0:1}" == '$' ]]; then let variable++; compopt -o dirnames +o filenames; else compopt +o dirnames -o filenames; fi; if test -d "$c"; then compopt -o nospace; else compopt +o nospace; fi; shopt -q extglob && let glob++; ((glob == 0)) && shopt -s extglob; case "$c" in *[*?[]*) COMPREPLY=(); ((glob == 0)) && shopt -u extglob; return 0 ;; \$\(*\)) eval COMPREPLY=\(${c}\); compopt +o plusdirs ;; \$\(*) COMPREPLY=($(compgen -c -P '$(' -S ')' -- ${c#??})); if ((${#COMPREPLY[@]} > 0)); then compopt +o plusdirs; let isdir++; fi ;; \`*\`) eval COMPREPLY=\(${c}\); compopt +o plusdirs ;; \`*) COMPREPLY=($(compgen -c -P '\`' -S '\`' -- ${c#?})); if ((${#COMPREPLY[@]} > 0)); then compopt +o plusdirs; let isdir++; fi ;; \$\{*\}) eval COMPREPLY=\(${c}\) ;; \$\{*) COMPREPLY=($(compgen -v -P '${' -S '}' -- ${c#??})); if ((${#COMPREPLY[@]} > 0)); then compopt +o plusdirs; if ((${#COMPREPLY[@]} > 1)); then ((glob == 0)) && shopt -u extglob; return 0; fi; let isdir++; eval COMPREPLY=\(${COMPREPLY[@]}\); fi ;; \$*) COMPREPLY=($(compgen -v -P '$' $s -- ${c#?})); if ((${#COMPREPLY[@]} > 0)); then compopt +o plusdirs; if ((${#COMPREPLY[@]} > 1)); then ((glob == 0)) && shopt -u extglob; return 0; fi; let isdir++; eval COMPREPLY=\(${COMPREPLY[@]}\); fi ;; \~*/*) COMPREPLY=($(compgen -d $s +o plusdirs -- "${c}")); if ((${#COMPREPLY[@]} > 0)); then compopt +o plusdirs; let isdir++; fi ;; \~*) COMPREPLY=($(compgen -u $s -- "${c}")); if ((${#COMPREPLY[@]} > 0)); then compopt +o plusdirs; let isdir++; fi ;; *\:*) if [[ $COMP_WORDBREAKS =~ : ]]; then x=${c%"${c##*[^\\]:}"}; COMPREPLY=($(compgen -d $s +o plusdirs -- "${c}")); COMPREPLY=(${COMPREPLY[@]#"$x"}); ((${#COMPREPLY[@]} == 0)) || let isdir++; fi; ((glob == 0)) && shopt -u extglob; return 0 ;; *) COMPREPLY=(); ((glob == 0)) && shopt -u extglob; return 0 ;; esac; ((quoted)) || _compreply_ $isdir; ((glob == 0)) && shopt -u extglob } _man_ () { local c=${COMP_WORDS[COMP_CWORD]}; local o=${COMP_WORDS[COMP_CWORD-1]}; local os="- f k P S t l"; local ol="whatis apropos pager sections troff local-file"; local m s; if test -n "$MANPATH"; then m=${MANPATH//:/\/man,}; else m="/usr/X11R6/man/man,/usr/openwin/man/man,/usr/share/man/man"; fi; case "$c" in -) COMPREPLY=($os) ;; --) COMPREPLY=($ol) ;; -?) COMPREPLY=($c) ;; \./*) COMPREPLY=($(compgen -f -d -X '\./.*' +o plusdirs -- $c)) ;; [0-9n] | [0-9n]p) COMPREPLY=($c) ;; *) case "$o" in -l | --local-file) COMPREPLY=($(compgen -f -d -X '.*' +o plusdirs -- $c)) ;; [0-9n] | [0-9n]p) s=$(eval echo {${m}}$o/); if type -p sed &>/dev/null; then COMPREPLY=($(command ls -1UA $s 2>/dev/null| command sed -rn "/^$c/{s@\.[0-9n].*\.gz@@g;s@.*/:@@g;p;}")); else s=($(ls -1fUA $s 2>/dev/null)); s=(${s[@]%%.[0-9n]*}); s=(${s[@]#*/:}); for m in ${s[@]}; do case "$m" in $c*) COMPREPLY=(${COMPREPLY[@]} $m) ;; esac; done; unset m s; COMPREPLY=(${COMPREPLY[@]%%.[0-9n]*}); COMPREPLY=(${COMPREPLY[@]#*/:}); fi ;; *) COMPREPLY=($(compgen -c -- $c)) ;; esac ;; esac } _ooexp_ () { local c=${COMP_WORDS[COMP_CWORD]}; local a="${COMP_LINE}"; local e s g=0 cd dc t=""; local IFS; shopt -q extglob && g=1; test $g -eq 0 && shopt -s extglob; cd='*-?(c)d*'; dc='*-d?(c)*'; case "${1##*/}" in oodraw) e='!*.+(sxd|SXD|std|STD|dxf|DXF|emf|EMF|eps|EPS|met|MET|pct|PCT|sgf|SGF|sgv|SGV|sda|SDA|sdd|SDD|vor|VOR|svm|SVM|wmf|WMF|bmp|BMP|gif|GIF|jpg|JPG|jpeg|JPEG|jfif|JFIF|fif|FIF|jpe|JPE|pcd|PCD|pcx|PCX|pgm|PGM|png|PNG|ppm|PPM|psd|PSD|ras|RAS|tga|TGA|tif|TIF|tiff|TIFF|xbm|XBM|xpm|XPM|odg|ODG|otg|OTG|fodg|FODG|odc|ODC|odi|ODI|sds|SDS|wpg|WPG|svg|SVG)' ;; oobase) e='!*.+(odb|ODB)' ;; ooffice) e='!*.+(sxd|SXD|std|STD|dxf|DXF|emf|EMF|eps|EPS|met|MET|pct|PCT|sgf|SGF|sgv|SGV|sda|SDA|sdd|SDD|vor|VOR|svm|SVM|wmf|WMF|bmp|BMP|gif|GIF|jpg|JPG|jpeg|JPEG|jfif|JFIF|fif|FIF|jpe|JPE|pcd|PCD|pcx|PCX|pgm|PGM|png|PNG|ppm|PPM|psd|PSD|ras|RAS|tga|TGA|tif|TIF|tiff|TIFF|xbm|XBM|xpm|XPM|odg|ODG|otg|OTG|fodg|FODG|odc|ODC|odi|ODI|sds|SDS|wpg|WPG|svg|SVG|doc|DOC|dot|DOT|rtf|RTF|sxw|SXW|stw|STW|sdw|SDW|vor|VOR|txt|TXT|htm?|HTM?|xml|XML|wp|WP|wpd|WPD|wps|WPS|odt|ODT|ott|OTT|fodt|FODT|docm|DOCM|docx|DOCX|dotm|DOTM|dotx|DOTX|sxm|SXM|smf|SMF|mml|MML|odf|ODF|sxi|SXI|sti|STI|ppt|PPT|pps|PPS|pot|POT|sxd|SXD|sda|SDA|sdd|SDD|sdp|SDP|vor|VOR|cgm|CGM|odp|ODP|otp|OTP|fodp|FODP|ppsm|PPSM|ppsx|PPSX|pptm|PPTM|pptx|PPTX|potm|POTM|potx|POTX|odb|ODB|sxc|SXC|stc|STC|dif|DIF|dbf|DBF|xls|XLS|xlw|XLW|xlt|XLT|rtf|RTF|sdc|SDC|vor|VOR|slk|SLK|txt|TXT|htm|HTM|html|HTML|wk1|WK1|wks|WKS|123|123|xml|XML|ods|ODS|ots|OTS|fods|FODS|csv|CSV|xlsb|XLSB|xlsm|XLSM|xlsx|XLSX|xltm|XLTM|xltx|XLTX|sxg|SXG|odm|ODM|sgl|SGL|stw|STW|dot|DOT|vor|VOR|stc|STC|xlt|XLT|sti|STI|pot|POT|std|STD|stw|STW|dotm|DOTM|dotx|DOTX|potm|POTM|potx|POTX|xltm|XLTM|xltx|XLTX|htm|HTM|html|HTML|stw|STW|txt|TXT|vor|VOR|oth|OTH)' ;; ooweb) e='!*.+(htm|HTM|html|HTML|stw|STW|txt|TXT|vor|VOR|oth|OTH)' ;; unopkg) e='!*.+(oxt|OXT)' ;; openoffice) e='!*.+(sxd|SXD|std|STD|dxf|DXF|emf|EMF|eps|EPS|met|MET|pct|PCT|sgf|SGF|sgv|SGV|sda|SDA|sdd|SDD|vor|VOR|svm|SVM|wmf|WMF|bmp|BMP|gif|GIF|jpg|JPG|jpeg|JPEG|jfif|JFIF|fif|FIF|jpe|JPE|pcd|PCD|pcx|PCX|pgm|PGM|png|PNG|ppm|PPM|psd|PSD|ras|RAS|tga|TGA|tif|TIF|tiff|TIFF|xbm|XBM|xpm|XPM|odg|ODG|otg|OTG|fodg|FODG|odc|ODC|odi|ODI|sds|SDS|wpg|WPG|svg|SVG|doc|DOC|dot|DOT|rtf|RTF|sxw|SXW|stw|STW|sdw|SDW|vor|VOR|txt|TXT|htm?|HTM?|xml|XML|wp|WP|wpd|WPD|wps|WPS|odt|ODT|ott|OTT|fodt|FODT|docm|DOCM|docx|DOCX|dotm|DOTM|dotx|DOTX|sxm|SXM|smf|SMF|mml|MML|odf|ODF|sxi|SXI|sti|STI|ppt|PPT|pps|PPS|pot|POT|sxd|SXD|sda|SDA|sdd|SDD|sdp|SDP|vor|VOR|cgm|CGM|odp|ODP|otp|OTP|fodp|FODP|ppsm|PPSM|ppsx|PPSX|pptm|PPTM|pptx|PPTX|potm|POTM|potx|POTX|odb|ODB|sxc|SXC|stc|STC|dif|DIF|dbf|DBF|xls|XLS|xlw|XLW|xlt|XLT|rtf|RTF|sdc|SDC|vor|VOR|slk|SLK|txt|TXT|htm|HTM|html|HTML|wk1|WK1|wks|WKS|123|123|xml|XML|ods|ODS|ots|OTS|fods|FODS|csv|CSV|xlsb|XLSB|xlsm|XLSM|xlsx|XLSX|xltm|XLTM|xltx|XLTX|sxg|SXG|odm|ODM|sgl|SGL|stw|STW|dot|DOT|vor|VOR|stc|STC|xlt|XLT|sti|STI|pot|POT|std|STD|stw|STW|dotm|DOTM|dotx|DOTX|potm|POTM|potx|POTX|xltm|XLTM|xltx|XLTX|htm|HTM|html|HTML|stw|STW|txt|TXT|vor|VOR|oth|OTH)' ;; oocalc) e='!*.+(sxc|SXC|stc|STC|dif|DIF|dbf|DBF|xls|XLS|xlw|XLW|xlt|XLT|rtf|RTF|sdc|SDC|vor|VOR|slk|SLK|txt|TXT|htm|HTM|html|HTML|wk1|WK1|wks|WKS|123|123|xml|XML|ods|ODS|ots|OTS|fods|FODS|csv|CSV|xlsb|XLSB|xlsm|XLSM|xlsx|XLSX|xltm|XLTM|xltx|XLTX)' ;; oomath) e='!*.+(sxm|SXM|smf|SMF|mml|MML|odf|ODF)' ;; oofromtemplate) e='!*.+(stw|STW|dot|DOT|vor|VOR|stc|STC|xlt|XLT|sti|STI|pot|POT|std|STD|stw|STW|dotm|DOTM|dotx|DOTX|potm|POTM|potx|POTX|xltm|XLTM|xltx|XLTX)' ;; ooimpress) e='!*.+(sxi|SXI|sti|STI|ppt|PPT|pps|PPS|pot|POT|sxd|SXD|sda|SDA|sdd|SDD|sdp|SDP|vor|VOR|cgm|CGM|odp|ODP|otp|OTP|fodp|FODP|ppsm|PPSM|ppsx|PPSX|pptm|PPTM|pptx|PPTX|potm|POTM|potx|POTX)' ;; oowriter) e='!*.+(doc|DOC|dot|DOT|rtf|RTF|sxw|SXW|stw|STW|sdw|SDW|vor|VOR|txt|TXT|htm?|HTM?|xml|XML|wp|WP|wpd|WPD|wps|WPS|odt|ODT|ott|OTT|fodt|FODT|docm|DOCM|docx|DOCX|dotm|DOTM|dotx|DOTX|sxg|SXG|odm|ODM|sgl|SGL)' ;; *) e='!*' ;; esac; case "$(complete -p ${1##*/} 2> /dev/null)" in *-d*) ;; *) s="-S/" ;; esac; IFS=' '; case "$c" in \$\(*\)) eval COMPREPLY=\(${c}\) ;; \$\(*) COMPREPLY=($(compgen -c -P '$(' -S ')' -- ${c#??})) ;; \`*\`) eval COMPREPLY=\(${c}\) ;; \`*) COMPREPLY=($(compgen -c -P '\`' -S '\`' -- ${c#?})) ;; \$\{*\}) eval COMPREPLY=\(${c}\) ;; \$\{*) COMPREPLY=($(compgen -v -P '${' -S '}' -- ${c#??})) ;; \$*) COMPREPLY=($(compgen -v -P '$' -- ${c#?})) ;; \~*/*) COMPREPLY=($(compgen -f -X "$e" -- ${c})) ;; \~*) COMPREPLY=($(compgen -u ${s} -- ${c})) ;; *@*) COMPREPLY=($(compgen -A hostname -P '@' -S ':' -- ${c#*@})) ;; *[*?[]*) COMPREPLY=($(compgen -G "${c}")) ;; *[?*+\!@]\(*\)*) if test $g -eq 0; then COMPREPLY=($(compgen -f -X "$e" -- $c)); test $g -eq 0 && shopt -u extglob; return; fi; COMPREPLY=($(compgen -G "${c}")) ;; *) if test "$c" = ".."; then COMPREPLY=($(compgen -d -X "$e" -S / ${_nosp} -- $c)); else for s in $(compgen -f -X "$e" -- $c); do if test -d $s; then COMPREPLY=(${COMPREPLY[@]} $(compgen -f -X "$e" -S / -- $s)); else if test -z "$t"; then COMPREPLY=(${COMPREPLY[@]} $s); else case "$(file -b $s 2> /dev/null)" in $t) COMPREPLY=(${COMPREPLY[@]} $s) ;; esac; fi; fi; done; fi ;; esac; test $g -eq 0 && shopt -u extglob } _pacat () { local cur prev comps; local flags='-h --help --version -r --record -p --playback -v --verbose -s --server= -d --device= -n --client-name= --stream-name= --volume= --rate= --format= --channels= --channel-map= --fix-format --fix-rate --fix-channels --no-remix --no-remap --latency= --process-time= --latency-msec= --process-time-msec= --property= --raw --passthrough --file-format= --list-file-formats'; _init_completion -n = || return; case $cur in --server=*) cur=${cur#*=}; _known_hosts_real "$cur" ;; --device=*) cur=${cur#*=}; comps=$(__sinks); comps+=" "$(__sources); COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) ;; --rate=*) cur=${cur#*=}; COMPREPLY=($(compgen -W '32000 44100 48000 9600 192000' -- "$cur")) ;; --file-format=*) cur=${cur#*=}; comps=$(_pacat_file_formats); COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) ;; --*=*) ;; -*) COMPREPLY=($(compgen -W '${flags[*]}' -- "$cur")); [[ $COMPREPLY == *= ]] && compopt -o nospace ;; *) _filedir ;; esac; case $prev in -s) _known_hosts_real "$cur" ;; -d) comps=$(__sinks); comps+=" "$(__sources); COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) ;; esac } _pacat_file_formats () { while IFS=' ' read name _; do printf "%s\n" "$name"; done < <(pacat --list-file-formats 2> /dev/null) } _pacmd () { local cur prev words cword preprev command; local comps; local flags='-h --help --version'; local commands=(exit help list-modules list-cards list-sinks list-sources list-clients list-samples list-sink-inputs list-source-outputs stat info load-module unload-module describe-module set-sink-volume set-source-volume set-sink-input-volume set-source-output-volume set-sink-mute set-source-mut set-sink-input-mute set-source-output-mute update-sink-proplist update-source-proplist update-sink-input-proplist update-source-output-proplist set-default-sink set-default-source kill-client kill-sink-input kill-source-output play-sample remove-sample load-sample load-sample-lazy load-sample-dir-lazy play-file dump move-sink-input move-source-output suspend-sink suspend-source suspend set-card-profile set-sink-port set-source-port set-port-latency-offset set-log-target set-log-level set-log-meta set-log-time set-log-backtrace); _init_completion -n = || return; preprev=${words[$cword-2]}; for word in "${COMP_WORDS[@]}"; do if in_array "$word" "${commands[@]}"; then command=$word; break; fi; done; case $preprev in play-sample | play-file) comps=$(__sinks); COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) ;; load-sample*) _filedir ;; move-sink-input) comps=$(__sinks); COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) ;; move-source-output) comps=$(__sources); COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) ;; set-card-profile) comps=$(__profiles); COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) ;; set-*port*) comps=$(__ports); COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) ;; set-*-mute) COMPREPLY=($(compgen -W 'true false' -- "$cur")) ;; set-sink-formats) ;; esac; case $prev in list-*) ;; describe-module | load-module) comps=$(__all_modules); COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) ;; unload-module) comps=$(__loaded_modules); COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) ;; load-sample-dir-lazy) _filedir -d ;; play-file) _filedir ;; *sink-input*) comps=$(__sink_inputs); COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) ;; *source-output*) comps=$(__source_outputs); COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) ;; *sink*) comps=$(__sinks); COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) ;; *source*) comps=$(__sources); COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) ;; set-card*) comps=$(__cards); COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) ;; set-port-*) comps=$(__cards); COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) ;; set-log-target) COMPREPLY=($(compgen -W 'auto syslog stderr file: newfile:' -- "$cur")) ;; set-log-level) COMPREPLY=($(compgen -W '{0..4}' -- "$cur")) ;; set-log-meta | set-log-time | suspend) COMPREPLY=($(compgen -W 'true false' -- "$cur")) ;; esac; case $cur in -*) COMPREPLY=($(compgen -W '${flags[*]}' -- "$cur")) ;; suspend) COMPREPLY=($(compgen -W 'suspend suspend-sink suspend-source' -- "$cur")) ;; load-sample) COMPREPLY=($(compgen -W 'load-sample load-sample-lazy load-sample-dir-lazy' -- "$cur")) ;; *) [[ -z $command ]] && COMPREPLY=($(compgen -W '${commands[*]}' -- "$cur")) ;; esac } _pactl () { local cur prev words cword preprev command; local comps; local flags='-h --help --version -s --server= --client-name='; local list_types='short sinks sources sink-inputs source outputs cards modules samples clients'; local commands=(stat info list exit upload-sample play-sample remove-sample load-module unload-module move-sink-input move-source-output suspend-sink suspend-source set-card-profile set-sink-port set-source-port set-sink-volume set-source-volume set-sink-input-volume set-source-output-volume set-sink-mute set-source-mute set-sink-input-mute set-source-output-mute set-sink-formats set-port-latency-offset subscribe help); _init_completion -n = || return; preprev=${words[$cword-2]}; for word in "${COMP_WORDS[@]}"; do if in_array "$word" "${commands[@]}"; then command=$word; break; fi; done; case $preprev in list) COMPREPLY=($(compgen -W 'short' -- "$cur")) ;; play-sample) comps=$(__sinks); COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) ;; move-sink-input) comps=$(__sinks); COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) ;; move-source-output) comps=$(__sources); COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) ;; set-card-profile) comps=$(__profiles); COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) ;; set-*-port) comps=$(__ports); COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) ;; set-*-mute) COMPREPLY=($(compgen -W 'true false toggle' -- "$cur")) ;; set-sink-formats) ;; set-port-*) comps=$(__ports); COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) ;; --server) compopt +o nospace; _known_hosts_real "$cur" ;; esac; [[ -n $COMPREPLY ]] && return 0; case $prev in list) COMPREPLY=($(compgen -W '${list_types[*]}' -- "$cur")) ;; stat) COMPREPLY=($(compgen -W 'short' -- "$cur")) ;; upload-sample) _filedir ;; play-sample) ;; remove-sample) ;; load-module) comps=$(__all_modules); COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) ;; unload-module) comps=$(__loaded_modules); COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) ;; set-card*) comps=$(__cards); COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) ;; *sink-input*) comps=$(__sink_inputs); COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) ;; *source-output*) comps=$(__source_outputs); COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) ;; set-sink-formats) comps=$(__sinks_idx); COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) ;; *sink*) comps=$(__sinks); COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) ;; *source*) comps=$(__sources); COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) ;; set-port*) comps=$(__cards); COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) ;; -s) _known_hosts_real "$cur" ;; esac; [[ -n $COMPREPLY ]] && return 0; case $cur in --server=*) cur=${cur#*=}; _known_hosts_real "$cur" ;; -*) COMPREPLY=($(compgen -W '${flags[*]}' -- "$cur")); [[ $COMPREPLY == *= ]] && compopt -o nospace ;; *) [[ -z $command ]] && COMPREPLY=($(compgen -W '${commands[*]}' -- "$cur")) ;; esac } _padsp () { local cur prev; local flags='-h -s -n -m -M -S -D -d'; _get_comp_words_by_ref cur prev; case $cur in -*) COMPREPLY=($(compgen -W '${flags[*]}' -- "$cur")) ;; esac; case $prev in -s) _known_hosts_real "$cur" ;; esac } _pasuspender () { local cur prev; local flags='-h --help --version -s --server='; _init_completion -n = || return; case $cur in --server=*) cur=${cur#*=}; _known_hosts_real "$cur" ;; -*) COMPREPLY=($(compgen -W '${flags[*]}' -- "$cur")); [[ $COMPREPLY == *= ]] && compopt -o nospace ;; esac; case $prev in -s) _known_hosts_real "$cur" ;; esac } _pulseaudio () { local cur prev words cword; local flags='-h --help --version --dump-conf --dump-resample-methods --cleanup-shm --start -k --kill --check --system= -D --daemonize= --fail= --high-priority= --realtime= --disallow-module-loading= --disallow-exit= --exit-idle-time= --scache-idle-time= --log-level= -v --log-target= --log-meta= --log-time= --log-backtrace= -p --dl-search-path= --resample-method= --use-pit-file= --no-cpu-limit= --disable-shm= -L --load= -F --file= -C -n'; _init_completion -n = || return; case $cur in --system=* | --daemonize=* | --fail=* | --high-priority=* | --realtime=* | --disallow-*=* | --log-meta=* | --log-time=* | --use-pid-file=* | --no-cpu-limit=* | --disable-shm=*) cur=${cur#*=}; COMPREPLY=($(compgen -W 'true false' -- "$cur")) ;; --log-target=*) cur=${cur#*=}; COMPREPLY=($(compgen -W 'auto syslog stderr file: newfile:' -- "$cur")) ;; --log-level=*) cur=${cur#*=}; COMPREPLY=($(compgen -W '{0..4}' -- "$cur")) ;; --dl-search-path=*) cur=${cur#*=}; _filedir -d ;; --file=*) cur=${cur#*=}; _filedir ;; --resample-method=*) cur=${cur#*=}; comps=$(__resample_methods); COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) ;; --load=*) cur=${cur#*=}; comps=$(__all_modules); COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) ;; --*=*) ;; -*) COMPREPLY=($(compgen -W '${flags[*]}' -- "$cur")); [[ $COMPREPLY == *= ]] && compopt -o nospace ;; esac; case $prev in -D) COMPREPLY=($(compgen -W 'true false' -- "$cur")) ;; -p) _filedir -d ;; -F) _filedir ;; -L) cur=${cur#*=}; comps=$(__all_modules); COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) ;; esac } _rootpath_ () { local c=${COMP_WORDS[COMP_CWORD]}; local os="-h -K -k -L -l -V -v -b -E -H -P -S -i -s"; local ox="-r -p -t -u"; case "$c" in -*) COMPREPLY=($(compgen -W "$os $ox" -- "$c")) ;; *) if ((COMP_CWORD <= 1)); then COMPREPLY=($(PATH=/sbin:/usr/sbin:$PATH:/usr/local/sbin compgen -c -- "${c}")); else COMPREPLY=(); fi ;; esac; if ((${#COMPREPLY[@]} > 0)); then let o=0; for s in ${COMPREPLY[@]}; do e=$(eval echo $s); if test -d "$e"; then compopt -o plusdirs; break; fi; if ! type -p "$e" > /dev/null 2>&1; then COMPREPLY[$o]=$(PATH=/sbin:/usr/sbin:$PATH:/usr/local/sbin type -p "$e" 2> /dev/null); fi; let o++; done; fi } _scout () { SCOUT_CMDLIST=(); SCOUT=`which scout`; local opts cur prev prevprev; if test ${#SCOUT_CMDLIST[*]} = 0; then for foo in $(LC_ALL=C $SCOUT 2>&1 | sed -e "1,/Available modules:/d" | egrep [a-z] | awk -F ' ' '{print $1}'); do SCOUT_CMDLIST="$SCOUT_CMDLIST $foo"; done; SCOUT_CMDLIST="$SCOUT_CMDLIST"; fi; cur=${COMP_WORDS[COMP_CWORD]}; prev=${COMP_WORDS[COMP_CWORD-1]}; if [[ ${#COMP_WORDS[@]} -ge 3 ]]; then prevprev=${COMP_WORDS[COMP_CWORD-2]}; fi; case "$prev" in scout) opts=$SCOUT_CMDLIST; COMPREPLY=($(compgen -W "${opts}" -- ${cur})) ;; autoconf) opts=`$SCOUT autoconf 2>&1 | sed -e "1,/Options:/d" | awk -F ', ' '{print $2}' | sed -e 's/ .*//' -e 's/--repo=REPO/--repo/'`; COMPREPLY=($(compgen -W "${opts}" -- ${cur})) ;; bin) opts=`$SCOUT bin 2>&1 | sed -e "1,/Options:/d" | awk -F ', ' '{print $2}' | sed -e 's/ .*//' -e 's/--repo=REPO/--repo/'`; COMPREPLY=($(compgen -W "${opts}" -- ${cur})) ;; java) opts=`$SCOUT java 2>&1 | sed -e "1,/Options:/d" | awk -F ', ' '{print $2}' | sed -e 's/ .*//' -e 's/--repo=REPO/--repo/'`; COMPREPLY=($(compgen -W "${opts}" -- ${cur})) ;; perl) opts=`$SCOUT perl 2>&1 | sed -e "1,/Options:/d" | awk -F ', ' '{print $2}' | sed -e 's/ .*//' -e 's/--repo=REPO/--repo/'`; COMPREPLY=($(compgen -W "${opts}" -- ${cur})) ;; pkgconfig) opts=`$SCOUT pkgconfig 2>&1 | sed -e "1,/Options:/d" | awk -F ', ' '{print $2}' | sed -e 's/ .*//' -e 's/--repo=REPO/--repo/'`; COMPREPLY=($(compgen -W "${opts}" -- ${cur})) ;; python) opts=`$SCOUT python 2>&1 | sed -e "1,/Options:/d" | awk -F ', ' '{print $2}' | sed -e 's/ .*//' -e 's/--repo=REPO/--repo/'`; COMPREPLY=($(compgen -W "${opts}" -- ${cur})) ;; ruby) opts=`$SCOUT ruby 2>&1 | sed -e "1,/Options:/d" | awk -F ', ' '{print $2}' | sed -e 's/ .*//' -e 's/--repo=REPO/--repo/'`; COMPREPLY=($(compgen -W "${opts}" -- ${cur})) ;; webpin) opts=`$SCOUT webpin 2>&1 | sed -e "1,/Options:/d" | awk -F ', ' '{print $2}' | sed -e 's/ .*//' -e 's/--repo=REPO/--repo/'`; COMPREPLY=($(compgen -W "${opts}" -- ${cur})) ;; --repo) if ( $SCOUT $prevprev --listrepos | egrep --color=auto "\- none \-" > /dev/null ); then echo -e "\nNo repositories are available"; else opts=`$SCOUT $prevprev --listrepos | sed 's/Available repositories://' | awk -F ' - ' '{print $1}'`; COMPREPLY=($(compgen -W "${opts}" -- ${cur})); fi ;; esac } _strip () { local s c o; if test ${#COMPREPLY[@]} -gt 0; then s="${COMP_WORDBREAKS// }"; s="${s// }"; s="${s//[\{\}()\[\]]}"; s="${s} (){}[]"; o=${#s}; while test $((o--)) -gt 0; do c="${s:${o}:1}"; COMPREPLY=(${COMPREPLY[*]//${c}/\\${c}}); done; fi } _yast2 () { local cur prevprev prev len idx mod MODOPTS line opt rest; MODOPTS=(); if test ${#YAST_MODLIST[*]} = 0; then YAST_MODLIST=($(LC_ALL=C $YAST -l| grep '^[a-z]' | grep -v "Available")); fi; if [[ ${#COMP_WORDS[@]} -gt 4 ]]; then return 0; fi; cur=${COMP_WORDS[COMP_CWORD]}; prev=${COMP_WORDS[COMP_CWORD-1]}; if [[ ${#COMP_WORDS[@]} -ge 3 && $COMP_CWORD -ge 2 ]]; then prevprev=${COMP_WORDS[COMP_CWORD-2]}; fi; if [[ $cur == '-' ]]; then COMPREPLY=(-h -l -g -s); return 0; fi; if [ "$prev" = "-i" -o "$prevprev" = "-i" -o "$prev" = "--install" -o "$prevprev" = "--install" -o "$prev" = "--remove" -o "$prevprev" = "--remove" -o "$prev" = "--update" -o "$prevprev" = "--update" ]; then return 0; fi; for mod in ${YAST_MODLIST[@]}; do if [[ -n $prevprev && $prevprev == $mod ]]; then MODOPTS=(`LC_ALL=C $YAST $mod $prev help 2>&1 | while read line ; do case "$line" in Options:*) while read opt rest ; do case "$opt" in "") break 2 ;; *) echo "$opt" esac done ;; esac done `); len=${#cur}; idx=0; for pval in ${MODOPTS[@]}; do if [[ "$cur" == "${pval:0:$len}" ]]; then COMPREPLY[$idx]=$pval; idx=$[$idx+1]; fi; done; return 0; fi; if [[ $prev == $mod ]]; then MODOPTS=(` LC_ALL=C $YAST $mod help 2>&1 | while read line ; do case "$line" in Basic\ Syntax:*) while read rest rest opt rest ; do case "$opt" in \<*\>) ;; "") break ;; *) echo "$opt" esac done ;; Commands:*) while read opt rest ; do case "$opt" in "") break 2 ;; *) echo "$opt" esac done ;; esac done `); len=${#cur}; idx=0; for pval in ${MODOPTS[@]}; do if [[ "$cur" == "${pval:0:$len}" ]]; then COMPREPLY[$idx]=$pval; idx=$[$idx+1]; fi; done; return 0; fi; done; len=${#cur}; idx=0; for pval in ${YAST_MODLIST[@]}; do if [[ "$cur" == "${pval:0:$len}" ]]; then COMPREPLY[$idx]=$pval; idx=$[$idx+1]; fi; done; return 0 } _zypper () { ZYPPER_CMDLIST=(); ZYPPER="$(type -p zypper)"; local noglob=$(shopt -po noglob); local magic_string="Command options:"; local comp cur prev command; local -a opts=(); local -i ITER=0; local IFS=' '; set -o noglob; if test ${#ZYPPER_CMDLIST[@]} -eq 0; then ZYPPER_CMDLIST=($(LC_ALL=POSIX $ZYPPER -q -h | sed -rn '/^[[:blank:]]*Commands:/,$ { /[\t]{4}/d s/^[[:blank:]]*// s/^[[:upper:]].*:// s/[[:blank:]]+[[:upper:]].*$// s/,[[:blank:]]+/\n/ s/\?/\\?/ /^$/d p }')); fi; if test $COMP_CWORD -lt 1; then let COMP_CWORD=${#COMP_WORDS[@]}; fi; prev=${COMP_WORDS[COMP_CWORD-1]}; cur=${COMP_WORDS[COMP_CWORD]}; let ITER=COMP_CWORD; while test $((ITER--)) -ge 0; do comp="${COMP_WORDS[ITER]}"; if [[ "${ZYPPER_CMDLIST[@]}" =~ "${comp}" ]]; then command=${COMP_WORDS[ITER]}; break; fi; if [[ "${comp}" =~ "zypper" ]]; then command="zypper"; break; fi; done; unset ITER comp; case "$prev" in "--type" | "-t") opts=(package patch pattern product); COMPREPLY=($(compgen -W "${opts[*]}" -- ${cur})); _strip; eval $noglob; return 0 ;; "--repo" | "-r") opts=(${opts[@]}$(echo; LC_ALL=POSIX $ZYPPER -q lr | sed -rn '/^[0-9]/{ s/^[0-9]+[[:blank:]]*\|[[:blank:]]*([^|]+).*/\1/ s/[[:blank:]]*$// p }')); COMPREPLY=($(compgen -W "${opts[*]}" -- ${cur})); _strip; eval $noglob; return 0 ;; esac; unset prev; if [[ "$command" =~ "zypper" ]]; then opts=(${ZYPPER_CMDLIST[*]}$(echo; LC_ALL=POSIX $ZYPPER -q help 2>&1 | sed -rn '/Global Options:/,/Commands:/{ /[\t]{4}/d s/^[[:blank:]]*// /[[:upper:]].*:/d s/[[:blank:]]+[[:upper:]].*$// s/[,[:blank:]].*$/\n/ /^$/d p }')); COMPREPLY=($(compgen -W "${opts[*]}" -- ${cur})); _strip; eval $noglob; return 0; fi; if test -n "$command"; then opts=$(LC_ALL=POSIX $ZYPPER -q help $command 2>&1 | sed -e "1,/$magic_string/d" -e 's/.*--/--/' -e 's/ .*//'); case "$command" in help | \?) opts=(${ZYPPER_CMDLIST[@]}) ;; removerepo | rr | modifyrepo | mr | renamerepo | nr | refresh | ref) opts=(${opts[@]}$(echo; LC_ALL=POSIX $ZYPPER -q lr | sed -rn '/^[0-9]/{ s/^[0-9]+[[:blank:]]*\|[[:blank:]]*([^|]+).*/\1/ s/[[:blank:]]*$// /^$/d p }')) ;; addservice | as | modifyservice | ms | removeservice | rs) opts=(${opts[@]}$(echo; LC_ALL=POSIX $ZYPPER -q ls | sed -rn '/^[0-9]/{ s/^[0-9]+[[:blank:]]*\|[[:blank:]]*([^|]+).*/\1/ s/[[:blank:]]*$// /^$/d p }')) ;; removelock | rl) opts=(${opts[@]}$(echo; LC_ALL=POSIX $ZYPPER -q ll | sed -rn '/^[0-9]/{ s/^[0-9]+[[:blank:]]*\|[[:blank:]]*([^|]+).*/\1/p s/[[:blank:]]*$// /^$/d p }')) ;; esac; IFS=' '; COMPREPLY=($(compgen -W "${opts[*]}" -- ${cur})); _strip; fi; eval $noglob } command_not_found_handle () { export TEXTDOMAINDIR=/usr/share/locale; export TEXTDOMAIN=command-not-found; local cmd state rest; local -i pid ppid pgrp session tty_nr tpgid; if test -n "$MC_SID" -o ! -t 1; then echo "$1: command not found"; return 127; fi; read pid cmd state ppid pgrp session tty_nr tpgid rest < /proc/self/stat; if test $$ -eq $tpgid; then echo "$1: command not found"; return 127; fi; if test -x "/usr/sbin/$1" -o -x "/sbin/$1"; then if test -x "/usr/sbin/$1"; then prefix='/usr'; else prefix=''; fi; echo "Absolute path to '$1' is '$prefix/sbin/$1', so running it may require superuser privileges (eg. root)."; return 127; fi; if test -n "$COMMAND_NOT_FOUND_AUTO"; then test -x /usr/bin/python && test -x /usr/bin/command-not-found && /usr/bin/python /usr/bin/command-not-found "$1" zypp; else echo -e "If '$1' is not a typo you can use command-not-found to lookup the package that contains it, like this: cnf $1"; fi; return 127 } in_array () { local i; for i in "${@:2}"; do [[ $1 = "$i" ]] && return; done } path () { if test -x /usr/bin/$1; then ${1+"/usr/bin/$@"}; else if test -x /bin/$1; then ${1+"/bin/$@"}; fi; fi } ppwd () { local dir; local -i width; test -n "$TS1" || return; dir="$(dirs +0)"; let width=${#dir}-18; test ${#dir} -le 18 || dir="...${dir#$(printf "%.*s" $width "$dir")}"; if test ${#TS1} -gt 17; then printf "$TS1" "$USER" "$HOST" "$dir" "$HOST"; else printf "$TS1" "$USER" "$HOST" "$dir"; fi } remount () { /bin/mount -o remount,${1+"$@"} } spwd () { ( IFS=/; set $PWD; if test $# -le 3; then echo "$PWD"; else eval echo \"..\${$(($#-1))}/\${$#}\"; fi ) } startx () { test -x /usr/bin/startx || { echo "No startx installed" 1>&2; return 1 }; /usr/bin/startx ${1+"$@"} 2>&1 | tee $HOME/.xsession-errors }