diff --git a/.cvsignore b/.cvsignore index a4a2967..576e507 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -bash-completion_20080705.tar.gz +bash-completion-20090115bzr1252.tar.bz2 diff --git a/bash-completion-20060301-man.patch b/bash-completion-20060301-man.patch deleted file mode 100644 index c003755..0000000 --- a/bash-completion-20060301-man.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- bash_completion~ 2008-09-11 21:22:40.000000000 +0300 -+++ bash_completion 2009-01-05 23:31:44.000000000 +0200 -@@ -761,9 +761,9 @@ - - _expand || return 0 - -- # default completion if parameter contains / -+ # file based completion if parameter contains / - if [[ "$cur" == */* ]]; then -- _filedir -+ _filedir '@([0-9]?([px])|[ln]|man)?(.@(gz|bz2|lzma))' - return 0 - fi - -@@ -783,7 +783,7 @@ - fi - - # determine manual section to search -- [[ "$prev" == [0-9ln] ]] && sect=$prev || sect='*' -+ [[ "$prev" == @([0-9]?([px])|[ln]) ]] && sect=$prev || sect='*' - - manpath=$manpath: - if [ -n "$cur" ]; then -@@ -800,7 +800,14 @@ - COMPREPLY=( ${COMPREPLY[@]%.@(gz|bz2|lzma)} ) - COMPREPLY=( $( compgen -W '${COMPREPLY[@]%.*}' -- "${cur//\\\\/}" ) ) - -- [[ "$prev" != [0-9ln] ]] && _filedir '[0-9ln]' -+ if [[ "$prev" != @([0-9]?([px])|[lnop]) ]]; then -+ # file based completion for the rest, prepending ./ if needed -+ local start=${#COMPREPLY[@]} -+ _filedir '@([0-9]?([px])|[ln]|man)?(.@(gz|bz2|lzma))' -+ for (( i=$start; i < ${#COMPREPLY[@]}; i++ )); do -+ [[ ${COMPREPLY[i]} == */* ]] || COMPREPLY[i]=./${COMPREPLY[i]} -+ done -+ fi - - return 0 - } diff --git a/bash-completion-20060301-rpm-eval.patch b/bash-completion-20060301-rpm-eval.patch deleted file mode 100644 index 625a616..0000000 --- a/bash-completion-20060301-rpm-eval.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -up bash_completion/bash_completion~ bash_completion/bash_completion ---- bash_completion/bash_completion~ 2006-03-01 18:20:18.000000000 +0200 -+++ bash_completion/bash_completion 2008-09-07 12:34:55.000000000 +0300 -@@ -1809,7 +1809,7 @@ _rpm() - --import' -- $cur ) ) - ;; - *) -- COMPREPLY=( $( compgen -W '-b -e -F -i -q -t -U -V' \ -+ COMPREPLY=( $( compgen -W '-b -e -E -F -i -q -t -U -V' \ - -- $cur ) ) - ;; - esac -@@ -1822,10 +1822,10 @@ _rpm() - _filedir -d - return 0 - ;; -- --eval) -+ --eval|-E) - # get a list of macros - COMPREPLY=( $( sed -ne 's|^\(%'${cur#\%}'[^ '$'\t'']*\).*$|\1|p' \ -- /usr/lib/rpm/macros ) ) -+ /usr/lib/rpm/macros /usr/lib/rpm/redhat/macros /etc/rpm/*macros ~/.rpmmacros ) ) - return 0 - ;; - --pipe) diff --git a/bash-completion-20060301-sqlite.patch b/bash-completion-20060301-sqlite.patch deleted file mode 100644 index 4ecc280..0000000 --- a/bash-completion-20060301-sqlite.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up bash_completion/bash_completion~ bash_completion/bash_completion ---- bash_completion/bash_completion~ 2006-03-01 18:20:18.000000000 +0200 -+++ bash_completion/bash_completion 2008-09-07 13:33:40.000000000 +0300 -@@ -115,6 +115,7 @@ complete -f -X '!*.@(sxd|std|sda|sdd|odg - complete -f -X '!*.@(sxm|smf|mml|odf)' oomath - complete -f -X '!*.odb' oobase - complete -f -X '!*.rpm' rpm2cpio -+complete -f -X '!*.sqlite' sqlite3 - # FINISH exclude -- do not remove this line - - # start of section containing compspecs that can be handled within bash diff --git a/bash-completion-20060301-yum-available-speedup-478784.patch b/bash-completion-20060301-yum-available-speedup-478784.patch deleted file mode 100644 index b621963..0000000 --- a/bash-completion-20060301-yum-available-speedup-478784.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- bash_completion~ 2008-09-11 21:22:40.000000000 +0300 -+++ bash_completion 2009-01-05 18:47:08.000000000 +0200 -@@ -6352,7 +6352,7 @@ - if [ -n "$special" ]; then - case $special in - install|deplist) -- COMPREPLY=( $( compgen -W '$( yum -C list | cut -d" " -f1 )' -- $cur ) ) -+ COMPREPLY=( $( compgen -W "$( yum -d 0 -C list available "$cur*" | cut -d' ' -f1 )" -- $cur ) ) - return 0 - ;; - *) diff --git a/bash-completion-20080705-getent.patch b/bash-completion-20080705-getent.patch deleted file mode 100644 index 281ee78..0000000 --- a/bash-completion-20080705-getent.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- bash_completion~ 2008-07-05 16:55:03.000000000 +0300 -+++ bash_completion 2009-01-06 19:00:26.000000000 +0200 -@@ -8742,19 +8742,19 @@ - COMPREPLY=( $( compgen -A hostname $cur ) ) - return 0 - ;; -- protocols) -- COMPREPLY=( $( getent protocols | awk '{print $1}' | grep "^$cur" ) ) -+ protocols|networks|ahosts|ahostsv4|ahostsv6|rpc) -+ COMPREPLY=( $( getent $prev | awk '{print $1}' | grep "^$cur" ) ) - return 0 - ;; -- networks) -- COMPREPLY=( $( getent networks | awk '{print $1}' | grep "^$cur" ) ) -+ aliases|shadow) -+ COMPREPLY=( $( getent $prev | cut -d : -f 1 | grep "^$cur" ) ) - return 0 - ;; - esac - - - if [ $COMP_CWORD -eq 1 ]; then -- COMPREPLY=( $( compgen -W 'passwd group hosts services protocols networks' -- $cur ) ) -+ COMPREPLY=( $( compgen -W 'passwd group hosts services protocols networks ahosts ahostsv4 ahostsv6 aliases ethers netgroup rpc shadow' -- $cur ) ) - fi - } && - complete -F _getent getent diff --git a/bash-completion-20080705-gzip.patch b/bash-completion-20080705-gzip.patch deleted file mode 100644 index 91c117e..0000000 --- a/bash-completion-20080705-gzip.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- bash_completion~ 2008-07-05 16:55:03.000000000 +0300 -+++ bash_completion 2009-01-06 19:02:34.000000000 +0200 -@@ -3377,7 +3377,7 @@ - have gzip && - _gzip() - { -- local cur prev xspec IFS=$'\t\n' -+ local cur prev xspec - - COMPREPLY=() - cur=`_get_cword` -@@ -3390,7 +3390,7 @@ - --stdout --decompress --force --help --list \ - --license --no-name --name --quiet --recursive \ - --suffix --test --verbose --version --fast \ -- --best' -- $cur ) ) -+ --best --rsyncable' -- $cur ) ) - return 0 - fi - diff --git a/bash-completion-20080705-jpeg2000-304771.patch b/bash-completion-20080705-jpeg2000-304771.patch deleted file mode 100644 index 4a3d21c..0000000 --- a/bash-completion-20080705-jpeg2000-304771.patch +++ /dev/null @@ -1,5 +0,0 @@ ---- bash_completion~ 2008-07-05 16:55:03.000000000 +0300 -+++ bash_completion 2009-01-06 18:39:48.000000000 +0200 -@@ -99 +99 @@ --complete -f -X '!*.@(gif|jp?(e)g|miff|tif?(f)|pn[gm]|p[bgp]m|bmp|xpm|ico|xwd|tga|pcx|svg|GIF|JP?(E)G|MIFF|TIF?(F)|PN[GM]|P[BGP]M|BMP|XPM|ICO|XWD|TGA|PCX|SVG)' display -+complete -f -X '!*.@(gif|jp?(e)g|jp[2cfx]|j2k|miff|tif?(f)|pn[gm]|p[bgp]m|bmp|xpm|ico|xwd|tga|pcx|svg|GIF|JP?(E)G|JP[2CFX]|J2K|MIFF|TIF?(F)|PN[GM]|P[BGP]M|BMP|XPM|ICO|XWD|TGA|PCX|SVG)' display diff --git a/bash-completion-20080705-lzma.patch b/bash-completion-20080705-lzma.patch deleted file mode 100644 index 6501930..0000000 --- a/bash-completion-20080705-lzma.patch +++ /dev/null @@ -1,83 +0,0 @@ ---- bash_completion~ 2008-07-05 16:55:03.000000000 +0300 -+++ bash_completion 2009-01-06 19:12:03.000000000 +0200 -@@ -873,7 +873,7 @@ - # weed out directory path names and paths to man pages - COMPREPLY=( ${COMPREPLY[@]##*/?(:)} ) - # strip suffix from man pages -- COMPREPLY=( ${COMPREPLY[@]%.@(gz|bz2)} ) -+ COMPREPLY=( ${COMPREPLY[@]%.@(gz|bz2|lzma)} ) - COMPREPLY=( $( compgen -W '${COMPREPLY[@]%.*}' -- "${cur//\\\\/}" ) ) - - [[ "$prev" != [0-9ln] ]] && _filedir '[0-9ln]' -@@ -2050,7 +2050,7 @@ - elif [[ ${COMP_WORDS[1]} == -b* ]]; then - _filedir 'spec' - else -- _filedir '@(tgz|tar.@(gz|bz2))' -+ _filedir '@(tgz|tar.@(gz|bz2|lzma))' - fi - ;; - --re@(build|compile)) -@@ -2062,7 +2062,7 @@ - fi - ;; - --tarbuild) -- _filedir '@(tgz|tar.@(gz|bz2))' -+ _filedir '@(tgz|tar.@(gz|bz2|lzma))' - ;; - --@(re|add)sign) - _filedir 'rpm' -@@ -3454,6 +3454,44 @@ - } && - complete -F _bzip2 $filenames bzip2 - -+# lzma(1) completion -+# -+have lzma && -+_lzma() -+{ -+ local cur prev xspec -+ -+ COMPREPLY=() -+ cur=`_get_cword` -+ prev=${COMP_WORDS[COMP_CWORD-1]} -+ -+ if [[ "$cur" == -* ]]; then -+ COMPREPLY=( $( compgen -W '-c -d -f -h -k -L -q -s \ -+ -v -V -z -1 -2 -3 -4 -5 -6 -7 -8 -9 \ -+ --help --decompress --compress --keep --force \ -+ --test --stdout --quiet --verbose --license \ -+ --version --small --fast --best --text' -- $cur ) ) -+ return 0 -+ fi -+ -+ xspec="*.lzma" -+ if [[ "$prev" == --* ]]; then -+ [[ "$prev" == --decompress || \ -+ "$prev" == --list || \ -+ "$prev" == --test ]] && xspec="!"$xspec -+ [[ "$prev" == --compress ]] && xspec= -+ elif [[ "$prev" == -* ]]; then -+ [[ "$prev" == -*[dt]* ]] && xspec="!"$xspec -+ [[ "$prev" == -*z* ]] && xspec= -+ fi -+ -+ _expand || return 0 -+ -+ COMPREPLY=( $( compgen -f -X "$xspec" -- $cur ) \ -+ $( compgen -d -- $cur ) ) -+} && -+complete -F _lzma $filenames lzma -+ - # openssl(1) completion - # - have openssl && { -@@ -7331,7 +7369,7 @@ - fi; - done - # strip suffix from info pages -- COMPREPLY=( ${COMPREPLY[@]%.@(gz|bz2)} ) -+ COMPREPLY=( ${COMPREPLY[@]%.@(gz|bz2|lzma)} ) - COMPREPLY=( $( compgen -W '${COMPREPLY[@]%.*}' -- "${cur//\\\\/}" ) ) - - return 0 diff --git a/bash-completion-20080705-mediafiles-444467.patch b/bash-completion-20080705-mediafiles-444467.patch deleted file mode 100644 index fd1ba5e..0000000 --- a/bash-completion-20080705-mediafiles-444467.patch +++ /dev/null @@ -1,8 +0,0 @@ ---- bash_completion~ 2008-07-05 16:55:03.000000000 +0300 -+++ bash_completion 2009-01-06 18:55:49.000000000 +0200 -@@ -112 +112 @@ --complete -f -X '!*.@(mp?(e)g|MP?(E)G|wma|avi|AVI|asf|vob|VOB|bin|dat|divx|DIVX|vcd|ps|pes|fli|flv|FLV|viv|rm|ram|yuv|mov|MOV|qt|QT|wmv|mp3|MP3|m4[pv]|M4[PV]|ogg|OGG|ogm|OGM|mp4|MP4|wav|WAV|asx|ASX|mng|MNG|srt)' xine aaxine fbxine kaffeine -+complete -f -X '!*@(.@(mp?(e)g|MP?(E)G|wm[av]|WM[AV]|avi|AVI|as[fx]|AS[FX]|vob|VOB|bin|BIN|dat|DAT|divx|DIVX|vcd|VCD|p?(e)s|P?(E)S|fl[iv]|FL[IV]|viv|VIV|rm?(j)|RM?(J)|ra?(m)|RA?(M)|yuv|YUV|mov|MOV|qt|QT|mp[234]|MP[234]|m4[pv]|M4[PV]|og[gm]|OG[GM]|wav|WAV|mng|MNG|srt|SRT|mkv|MKV|[0-9]*.@(vdr|VDR))' xine aaxine fbxine kaffeine -@@ -6090 +6090 @@ -- _filedir '@(mp?(e)g|MP?(E)G|wm[av]|WM[AV]|avi|AVI|asf|ASF|vob|VOB|bin|BIN|dat|DAT|vcd|VCD|ps|PS|pes|PES|fl[iv]|FL[IV]|viv|VIV|rm?(j)|RM?(J)|ra?(m)|RA?(M)|yuv|YUV|mov|MOV|qt|QT|mp[34]|MP[34]|m4[av]|M4[AV]|og[gm]|OG[GM]|w?(a)v|W?(A)V|dump|DUMP|mk[av]|MK[AV]|m4a|M4A|aac|AAC|m2v|M2V|dv|DV|rmvb|RMVB|mid|MID|ts|TS|3g[p2]|mpc|MPC|flac|FLAC|vro|VRO|divx|DIVX|aif?(f)|AIF?(F)|m2ts|M2TS)' -+ _filedir '@(mp?(e)g|MP?(E)G|wm[av]|WM[AV]|avi|AVI|asf|ASF|vob|VOB|bin|BIN|dat|DAT|vcd|VCD|p?(e)s|P?(E)S|fl[iv]|FL[IV]|viv|VIV|rm?(j)|RM?(J)|ra?(m)|RA?(M)|yuv|YUV|mov|MOV|qt|QT|mp[234]|MP[234]|m4[av]|M4[AV]|og[gm]|OG[GM]|w?(a)v|W?(A)V|dump|DUMP|mk[av]|MK[AV]|m4a|M4A|aac|AAC|m2v|M2V|dv|DV|rmvb|RMVB|mid|MID|ts|TS|3g[p2]|3G[P2]|mpc|MPC|flac|FLAC|vro|VRO|divx|DIVX|aif?(f)|AIF?(F)|m2ts|M2TS|vdr|VDR)' diff --git a/bash-completion-20080705-rpm-backups.patch b/bash-completion-20080705-rpm-backups.patch deleted file mode 100644 index c3ddb37..0000000 --- a/bash-completion-20080705-rpm-backups.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- bash_completion~ 2009-01-06 19:12:03.000000000 +0200 -+++ bash_completion 2009-01-06 19:23:35.000000000 +0200 -@@ -424,10 +424,10 @@ - local sysvdir famdir - [ -d /etc/rc.d/init.d ] && sysvdir=/etc/rc.d/init.d || sysvdir=/etc/init.d - famdir=/etc/xinetd.d -- COMPREPLY=( $( builtin echo $sysvdir/!(*.rpmsave|*.rpmorig|*~|functions)) ) -+ COMPREPLY=( $( builtin echo $sysvdir/!(*.rpmsave|*.rpmorig|*.rpmnew|*~|functions)) ) - - if [ -d $famdir ]; then -- COMPREPLY=( "${COMPREPLY[@]}" $( builtin echo $famdir/!(*.rpmsave|*.rpmorig|*~)) ) -+ COMPREPLY=( "${COMPREPLY[@]}" $( builtin echo $famdir/!(*.rpmsave|*.rpmorig|*.rpmnew|*~)) ) - fi - - COMPREPLY=( $( compgen -W '${COMPREPLY[@]#@($sysvdir|$famdir)/}' -- $cur ) ) -@@ -9080,7 +9080,7 @@ - [ -d /etc/rc.d/init.d ] && sysvdir=/etc/rc.d/init.d \ - || sysvdir=/etc/init.d - -- services=( $(echo $sysvdir/!(README*|*.sh|*.dpkg*|*.rpm*)) ) -+ services=( $(echo $sysvdir/!(README*|*.sh|*.dpkg*|*.rpmsave|*.rpmorig|*.rpmnew)) ) - services=( ${services[@]#$sysvdir/} ) - options=( -f -n ) - -@@ -9146,7 +9146,7 @@ - [ -d /etc/rc.d/init.d ] && sysvdir=/etc/rc.d/init.d \ - || sysvdir=/etc/init.d - -- services=( $(echo $sysvdir/!(README*|*.sh|*.dpkg*|*.rpm*)) ) -+ services=( $(echo $sysvdir/!(README*|*.sh|*.dpkg*|*.rpmsave|*.rpmorig|*.rpmnew)) ) - services=( ${services[@]#$sysvdir/} ) - options=( --help --quiet --force --try-anyway --disclose-deny --query --no-fallback ) - -@@ -9700,7 +9700,7 @@ - if [ -d $BASH_COMPLETION_DIR -a -r $BASH_COMPLETION_DIR -a \ - -x $BASH_COMPLETION_DIR ]; then - for i in $BASH_COMPLETION_DIR/*; do -- [[ ${i##*/} != @(*~|*.bak|*.swp|\#*\#|*.dpkg*|.rpm*) ]] && -+ [[ ${i##*/} != @(*~|*.bak|*.swp|\#*\#|*.dpkg*|*.rpmsave|*.rpmorig|*.rpmnew) ]] && - [ \( -f $i -o -h $i \) -a -r $i ] && . $i - done - fi diff --git a/bash-completion-20080705-rpm-installed.patch b/bash-completion-20080705-rpm-installed.patch deleted file mode 100644 index 23aaf5f..0000000 --- a/bash-completion-20080705-rpm-installed.patch +++ /dev/null @@ -1,80 +0,0 @@ ---- bash_completion~ 2009-01-06 19:12:03.000000000 +0200 -+++ bash_completion 2009-01-06 19:31:06.000000000 +0200 -@@ -1811,29 +1811,28 @@ - # - _rpm_installed_packages() - { -- local ver nodig nosig -+ local ver nodig="$1" nosig="$2" - - if [ -r /var/log/rpmpkgs -a \ - /var/log/rpmpkgs -nt /var/lib/rpm/Packages ]; then - # using RHL 7.2 or later - this is quicker than querying the DB - COMPREPLY=( $( sed -ne \ -- 's|^\('$cur'.*\)-[0-9a-zA-Z._]\+-[0-9a-z.@]\+.*\.rpm$|\1|p' \ -+ 's|^\('$cur'[^[:space:]]*\)-[^[:space:]-]\+-[^[:space:]-]\+\.rpm$|\1|p' \ - /var/log/rpmpkgs ) ) - else -- nodig="" -- nosig="" -- ver=$(rpm --version) -- ver=${ver##* } -+ if [ -z "$nodig" -a -z "$nosig" ]; then -+ ver=$(rpm --version) -+ ver=${ver##* } - -- if [[ "$ver" > "4.0.4" ]]; then -- nodig="--nodigest" -- fi -- if [[ "$ver" > "4.0.99" ]]; then -- nosig="--nosignature" -+ if [[ "$ver" > "4.0.4" ]]; then -+ nodig="--nodigest" -+ fi -+ if [[ "$ver" > "4.0.99" ]]; then -+ nosig="--nosignature" -+ fi - fi - -- COMPREPLY=( $( rpm -qa $nodig $nosig | sed -ne \ -- 's|^\('$cur'.*\)-[0-9a-zA-Z._]\+-[0-9a-z.@]\+$|\1|p' ) ) -+ COMPREPLY=( $( rpm -qa $nodig $nosig --qf='%{NAME} ' "$cur*" ) ) - fi - } - -@@ -1959,7 +1958,7 @@ - COMPREPLY=( $( compgen -W '--allmatches --noscripts \ - --notriggers --nodeps --test --repackage' -- $cur ) ) - else -- _rpm_installed_packages -+ _rpm_installed_packages "$nodig" "$nosig" - fi - ;; - -@(q*|-query)) -@@ -2011,7 +2010,7 @@ - --fileid --tid --nodigest --nosignature \ - --triggerscripts' -- $cur ) ) - elif [ "${COMP_LINE#* -*([^ -])a}" == "$COMP_LINE" ]; then -- _rpm_installed_packages -+ _rpm_installed_packages "$nodig" "$nosig" - fi - fi - ;; -@@ -2038,7 +2037,7 @@ - elif [ "${COMP_LINE#* -*([^ -])p}" != "$COMP_LINE" ]; then - _filedir 'rpm' - else -- _rpm_installed_packages -+ _rpm_installed_packages "$nodig" "$nosig" - fi - ;; - -[bt]*) -@@ -2068,7 +2067,7 @@ - _filedir 'rpm' - ;; - --set@(perms|gids)) -- _rpm_installed_packages -+ _rpm_installed_packages "$nodig" "$nosig" - ;; - --@(clean|rms@(ource|pec))) - if [[ "$cur" == -* ]]; then diff --git a/bash-completion-20080705-svn-filenames-430059.patch b/bash-completion-20080705-svn-filenames-430059.patch deleted file mode 100644 index a2b7604..0000000 --- a/bash-completion-20080705-svn-filenames-430059.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- bash_completion~ 2008-07-05 16:55:03.000000000 +0300 -+++ bash_completion 2009-01-06 18:58:11.000000000 +0200 -@@ -9446,7 +9446,7 @@ - - return 0 - } --complete -F _svn $default svn -+complete -F _svn $filenames svn - - _svnadmin() - { diff --git a/bash-completion-lzop b/bash-completion-lzop index b3107cd..59a7a42 100644 --- a/bash-completion-lzop +++ b/bash-completion-lzop @@ -1,42 +1,52 @@ -# bash completion for lzop(1) -*- sh -*- +# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*- +# ex: ts=8 sw=8 noet filetype=sh # +# lzop(1) completion + have lzop && _lzop() { - local cur prev xspec IFS=$' \t\n' + local cur prev xspec COMPREPLY=() cur=`_get_cword` prev=${COMP_WORDS[COMP_CWORD-1]} + # TODO: -p: takes a dir argument, without a separating space + if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-d -x -l -I -t -V -h -L -q -v -c \ - -o -p -f -n -N -P -S -U -1 -2 -3 -4 -5 -6 -7 -8 -9 \ - --fast --best --decompress --uncompress --extract \ + COMPREPLY=( $( compgen -W '-d -x -l -t -h -I -V -L -1 -2 -3 \ + -4 -5 -6 -7 -8 -9 -q -v -c -f -F -n -N -P -k -U -o \ + -S --fast --best --decompress --uncompress --extract \ --test --list --ls --info --sysinfo --license --help \ - --version --stdout --output --path --force --no-name \ - --no-checksum --name --no-mode --no-time --suffix \ - --keep --unlink --delete --crc32 --no-warn --quiet \ - --silent --ignore-warn --verbose --no-stdin --filter \ - --checksum --no-color --mono --color' -- $cur ) ) + --version --stdout --to-stdout --output --path \ + --force --no-checksum --no-name --name --no-mode \ + --no-time --suffix --keep --unlink --delete --crc32 \ + --no-warn --ignore-warn --quiet --silent --verbose \ + --no-stdin --filter --checksum --no-color --mono \ + --color' -- $cur ) ) return 0 fi + case "$prev" in + -o|--output) _filedir ; return 0 ;; + --path) _filedir -d ; return 0 ;; + -S|--suffix) return 0 ;; + esac + xspec="*.?(t)lzo" - if [[ "$prev" == --* ]]; then - [[ "$prev" == --@(de|un)compress || \ - "$prev" == --list || \ - "$prev" == --test ]] && xspec="!"$xspec - [[ "$prev" == --force ]] && xspec= - elif [[ "$prev" == -* ]]; then - [[ "$prev" == -*[dlt]* ]] && xspec="!"$xspec - [[ "$prev" == -*f* ]] && xspec= - elif [ "$prev" = '>' ]; then - xspec= - fi + case "$prev" in + --@(@(de|un)compress|extract|list|ls|info|test)) + xspec="!"$xspec ;; + --force) xspec= ;; + --*) ;; + -*f*|'<'|'>') xspec= ;; + -*[dltx]*) xspec="!"$xspec ;; + esac _expand || return 0 + local IFS=$'\t\n' COMPREPLY=( $( compgen -f -X "$xspec" -- $cur ) \ $( compgen -d -- $cur ) ) } && diff --git a/bash-completion-repomanage b/bash-completion-repomanage index 1bdff21..d932496 100644 --- a/bash-completion-repomanage +++ b/bash-completion-repomanage @@ -1,24 +1,24 @@ -# bash completion for repomanage -*- sh -*- +# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*- +# ex: ts=8 sw=8 noet filetype=sh +# +# bash completion for repomanage +have repomanage && _repomanage() { - local cur prev + local cur prev - COMPREPLY=() - cur=`_get_cword` - prev=${COMP_WORDS[COMP_CWORD-1]} + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} - case $prev in - -@(h|-help|k|-keep)) - return 0 - ;; - esac + [[ "$prev" == -@(h|-help|k|-keep) ]] && return 0 - if [[ "$cur" == -* ]] ; then - COMPREPLY=( $( compgen -W '-o --old -n --new -s --space -k --keep \ - -c --nocheck -h --help' -- $cur ) ) - else - _filedir -d - fi -} -complete -F _repomanage repomanage + if [[ "$cur" == -* ]] ; then + COMPREPLY=( $( compgen -W '-o --old -n --new -s --space -k \ + --keep -c --nocheck -h --help' -- $cur ) ) + else + _filedir -d + fi +} && +complete -F _repomanage $filenames repomanage diff --git a/bash-completion-snapshot.sh b/bash-completion-snapshot.sh new file mode 100644 index 0000000..eb52213 --- /dev/null +++ b/bash-completion-snapshot.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +if [ -z "$1" -o $# -ne 1 ]; then + echo "Usage: $0 " + exit 2 +fi + +rev="$1" +url=http://bzr.debian.org/bzr/bash-completion/current + +bzr export -r $rev bash-completion-$(date +%Y%m%d)bzr$rev.tar.bz2 $url diff --git a/bash-completion.spec b/bash-completion.spec index d5dbdcf..4f24f61 100644 --- a/bash-completion.spec +++ b/bash-completion.spec @@ -1,28 +1,24 @@ +%define snap 20090115bzr1252 + Name: bash-completion Version: 20080705 -Release: 1 +Release: 2%{?snap:.%{snap}} Summary: Programmable completion for Bash Group: System Environment/Shells License: GPLv2+ URL: http://bash-completion.alioth.debian.org/ +# Snapshot tarballs created with Source99 +%if 0%{?snap:1} +Source0: %{name}-%{snap}.tar.bz2 +%else Source0: http://ftp.debian.org/debian/pool/main/b/bash-completion/%{name}_%{version}.tar.gz +%endif Source1: %{name}-lzop Source2: %{name}-mock Source3: %{name}-repomanage Source4: %{name}-plague-client -Patch0: %{name}-20080705-rpm-installed.patch -Patch1: %{name}-20060301-yum-available-speedup-478784.patch -Patch2: %{name}-20080705-lzma.patch -Patch3: %{name}-20080705-jpeg2000-304771.patch -Patch4: %{name}-20080705-mediafiles-444467.patch -Patch5: %{name}-20080705-svn-filenames-430059.patch -Patch6: %{name}-20080705-gzip.patch -Patch7: %{name}-20060301-man.patch -Patch8: %{name}-20080705-rpm-backups.patch -Patch9: %{name}-20060301-rpm-eval.patch -Patch10: %{name}-20080705-getent.patch -Patch11: %{name}-20060301-sqlite.patch +Source99: %{name}-snapshot.sh BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -34,24 +30,12 @@ of the programmable completion feature of bash 2. %prep -%setup -q -n %{name} -%patch0 -%patch1 -%patch2 -%patch3 -%patch4 -%patch5 -%patch6 -%patch7 -%patch8 -%patch9 -p1 -%patch10 -%patch11 -p1 +%setup -q -n %{name}%{?snap:-%{snap}} install -pm 644 %{SOURCE1} contrib/lzop install -pm 644 %{SOURCE2} contrib/mock install -pm 644 %{SOURCE3} contrib/repomanage install -pm 644 %{SOURCE4} contrib/plague-client - +rm contrib/hg # Updated version shipped in the mercurial package %build @@ -80,7 +64,7 @@ rm -rf $RPM_BUILD_ROOT %define do_triggerun() [ $2 -gt 0 ] || rm -f %{_sysconfdir}/bash_completion.d/%1 || : # Not handled (yet?): -# bitkeeper, harbour, larch, lisp, p4, povray +# apache2ctl, bitkeeper, harbour, larch, lisp, p4, povray %triggerin -- bittorrent %do_triggerin bittorrent @@ -122,11 +106,21 @@ rm -rf $RPM_BUILD_ROOT %triggerun -- gkrellm %do_triggerun gkrellm +%triggerin -- gnupg2 +%do_triggerin gpg2 +%triggerun -- gnupg2 +%do_triggerun gpg2 + %triggerin -- lilypond %do_triggerin lilypond %triggerun -- lilypond %do_triggerun lilypond +%triggerin -- lzma +%do_triggerin lzma +%triggerun -- lzma +%do_triggerun lzma + %triggerin -- lzop %do_triggerin lzop %triggerun -- lzop @@ -142,21 +136,26 @@ rm -rf $RPM_BUILD_ROOT %triggerun -- mcrypt %do_triggerun mcrypt -%triggerin -- mercurial -%do_triggerin hg -%triggerun -- mercurial -%do_triggerun hg - %triggerin -- mock %do_triggerin mock %triggerun -- mock %do_triggerun mock +%triggerin -- monodevelop +%do_triggerin monodevelop +%triggerun -- monodevelop +%do_triggerun monodevelop + %triggerin -- mtx %do_triggerin mtx %triggerun -- mtx %do_triggerun mtx +%triggerin -- openssh-clients +%do_triggerin ssh +%triggerun -- openssh-clients +%do_triggerun ssh + %triggerin -- perl-SVK %do_triggerin svk %triggerun -- perl-SVK @@ -167,6 +166,11 @@ rm -rf $RPM_BUILD_ROOT %triggerun -- plague-client %do_triggerun plague-client +%triggerin -- qt +%do_triggerin qdbus +%triggerun -- qt +%do_triggerun qdbus + %triggerin -- ruby-ri %do_triggerin ri %triggerun -- ruby-ri @@ -187,6 +191,11 @@ rm -rf $RPM_BUILD_ROOT %triggerun -- snownews %do_triggerun snownews +%triggerin -- subversion +%do_triggerin _subversion +%triggerun -- subversion +%do_triggerun _subversion + %triggerin -- unace %do_triggerin unace %triggerun -- unace @@ -218,6 +227,11 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sun Jan 18 2009 Ville Skyttä - 20080705-2.20090115bzr1252 +- r1252 snapshot; all patches applied upstream. +- Do not install mercurial completion, an updated version is shipped with it. +- Improve lzop and repomanage completion. + * Tue Jan 6 2009 Ville Skyttä - 20080705-1 - 20080705; new upstream at http://bash-completion.alioth.debian.org/ - Perl, Debian, and scp patches applied upstream. diff --git a/sources b/sources index 3609a3a..28b88e0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8bc36281bb0567bc67a9083c4c5595a9 bash-completion_20080705.tar.gz +69a699369cd0dd836e9b93d7eed71f65 bash-completion-20090115bzr1252.tar.bz2