From b5b5adae16f480439950b8b47466f735d0b2aeba Mon Sep 17 00:00:00 2001 From: Ville Skyttä Date: Apr 13 2009 12:48:31 +0000 Subject: - Apply upstream patch to fix quoting issues with bash 4.x (#490322). 1.0-1 - 1.0. Mon Mar 23 2009 Ville Skyttä - 20080705-4.20090314gitf4f0984 - Add dependency on coreutils for triggers (#490768). - Update and improve mock completion. Sun Mar 15 2009 Ville Skyttä - 20080705-3.20090314gitf4f0984 - git snapshot f4f0984, fixes #484578 (another issue), #486998. Mon Feb 23 2009 Fedora Release Engineering - 20080705-3.20090211git47d0c5b - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild Wed Feb 11 2009 Ville Skyttä - 20080705-2.20090211git47d0c5b - git snapshot 47d0c5b, fixes #484578. - lzop and repomanage completions included upstream. 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. - Patch to improve man completion: more sections, better filename handling. - Patch to speed up yum install/deplist completion (#478784). - Patch to fix and speed up rpm installed packages completion. - Update mock completion. Thu Sep 25 2008 Ville Skyttä - More Matroska associations (#463829, based on patch from Yanko Kaneti). --- diff --git a/.cvsignore b/.cvsignore index e658700..9228f76 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -bash-completion-20060301.tar.bz2 +bash-completion-1.0.tar.gz diff --git a/bash-completion-1.0-bash4quoting-490322.patch b/bash-completion-1.0-bash4quoting-490322.patch new file mode 100644 index 0000000..79acef3 --- /dev/null +++ b/bash-completion-1.0-bash4quoting-490322.patch @@ -0,0 +1,30 @@ +From: Mike Kelly +Date: Thu, 2 Apr 2009 15:16:46 +0000 (-0400) +Subject: Fix _filedir on bash 4. +X-Git-Url: http://git.debian.org/?p=bash-completion%2Fbash-completion.git;a=commitdiff_plain;h=1421e55aac075e13491cd212b796bdd453214a2c + +Fix _filedir on bash 4. + +We don't need to double-quote things for compgen w/ bash 4. Just putting +each file in double quotes is sufficient. + +See: http://lists.gnu.org/archive/html/bug-bash/2009-03/msg00155.html +--- + +diff --git a/bash_completion b/bash_completion +index 0246cd8..4d21cf8 100644 +--- a/bash_completion ++++ b/bash_completion +@@ -209,6 +209,12 @@ quote() + # results in the original argument + quote_readline() + { ++ if [[ "${BASH_VERSINFO[0]}" -ge 4 ]] ; then ++ # This function isn't really necessary on bash 4 ++ # See: http://lists.gnu.org/archive/html/bug-bash/2009-03/msg00155.html ++ echo "${1}" ++ return ++ fi + local t="${1//\\/\\\\}" + echo \'${t//\'/\'\\\'\'}\' #'# Help vim syntax highlighting + } diff --git a/bash-completion-20060301-debian.patch b/bash-completion-20060301-debian.patch deleted file mode 100644 index e9fbecb..0000000 --- a/bash-completion-20060301-debian.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- bash_completion~ 2007-02-28 01:11:44.000000000 +0200 -+++ bash_completion 2007-02-28 01:11:44.000000000 +0200 -@@ -806,7 +806,7 @@ - [ $UNAME = GNU -o $UNAME = Linux -o $UNAME = Darwin \ - -o $UNAME = FreeBSD -o $UNAME = SunOS -o $UNAME = Cygwin \ - -o $UNAME = OpenBSD ] && \ --complete -F _man $filenames man -+complete -F _man $filenames man apropos whatis - - # renice(8) completion - # diff --git a/bash-completion-20060301-getent.patch b/bash-completion-20060301-getent.patch deleted file mode 100644 index 191f6c5..0000000 --- a/bash-completion-20060301-getent.patch +++ /dev/null @@ -1,28 +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:25:42.000000000 +0300 -@@ -8379,19 +8379,19 @@ _getent() - 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-20060301-gzip.patch b/bash-completion-20060301-gzip.patch deleted file mode 100644 index 6512995..0000000 --- a/bash-completion-20060301-gzip.patch +++ /dev/null @@ -1,21 +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-11 01:29:49.000000000 +0300 -@@ -3281,7 +3281,7 @@ complete -F _mysqladmin mysqladmin - have gzip && - _gzip() - { -- local cur prev xspec IFS=$'\t\n' -+ local cur prev xspec - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} -@@ -3290,7 +3290,7 @@ _gzip() - --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-20060301-jpeg2000-304771.patch b/bash-completion-20060301-jpeg2000-304771.patch deleted file mode 100644 index 787ac79..0000000 --- a/bash-completion-20060301-jpeg2000-304771.patch +++ /dev/null @@ -1,5 +0,0 @@ ---- bash_completion~ 2006-03-01 18:20:18.000000000 +0200 -+++ bash_completion 2007-11-16 23:23:20.000000000 +0200 -@@ -86 +86 @@ --complete -f -X '!*.@(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)' ee 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|GIF|JP?(E)G|JP[2CFX]|J2K|MIFF|TIF?(F)|PN[GM]|P[BGP]M|BMP|XPM|ICO|XWD|TGA|PCX)' ee display diff --git a/bash-completion-20060301-lzma.patch b/bash-completion-20060301-lzma.patch deleted file mode 100644 index 27f7d06..0000000 --- a/bash-completion-20060301-lzma.patch +++ /dev/null @@ -1,84 +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-10 19:02:25.000000000 +0300 -@@ -796,7 +796,7 @@ _man() - # 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]' -@@ -1971,7 +1971,7 @@ _rpm() - elif [[ ${COMP_WORDS[1]} == -b* ]]; then - _filedir 'spec' - else -- _filedir '@(tgz|tar.@(gz|bz2))' -+ _filedir '@(tgz|tar.@(gz|bz2|lzma))' - fi - ;; - --re@(build|compile)) -@@ -1983,7 +1983,7 @@ _rpm() - fi - ;; - --tarbuild) -- _filedir '@(tgz|tar.@(gz|bz2))' -+ _filedir '@(tgz|tar.@(gz|bz2|lzma))' - ;; - --@(re|add)sign) - _filedir 'rpm' -@@ -3356,6 +3356,44 @@ _bzip2() - } && - complete -F _bzip2 $filenames bzip2 - -+# lzma(1) completion -+# -+have lzma && -+_lzma() -+{ -+ local cur prev xspec -+ -+ COMPREPLY=() -+ cur=${COMP_WORDS[COMP_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 && { -@@ -6968,7 +7006,7 @@ _info() - 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-20060301-mediafiles-444467.patch b/bash-completion-20060301-mediafiles-444467.patch deleted file mode 100644 index c9058fd..0000000 --- a/bash-completion-20060301-mediafiles-444467.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- bash_completion.orig 2006-03-01 18:20:18.000000000 +0200 -+++ bash_completion 2008-04-28 20:52:32.000000000 +0300 -@@ -94,7 +94,7 @@ complete -f -X '!*.@(?(e)ps|?(E)PS)' ps2 - complete -f -X '!*.texi*' makeinfo texi2html - complete -f -X '!*.@(?(la)tex|?(LA)TEX|texi|TEXI|dtx|DTX|ins|INS)' tex latex slitex jadetex pdfjadetex pdftex pdflatex texi2dvi - complete -f -X '!*.@(mp3|MP3)' mpg123 mpg321 madplay --complete -f -X '!*.@(mp?(e)g|MP?(E)G|wma|avi|AVI|asf|vob|VOB|bin|dat|vcd|ps|pes|fli|viv|rm|ram|yuv|mov|MOV|qt|QT|wmv|mp3|MP3|ogg|OGG|ogm|OGM|mp4|MP4|wav|WAV|asx|ASX|mng|MNG)' 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|vcd|VCD|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]|og[gm]|OG[GM]|wav|WAV|mng|MNG)|[0-9]*.@(vdr|VDR))' xine aaxine fbxine kaffeine - complete -f -X '!*.@(avi|asf|wmv)' aviplay - complete -f -X '!*.@(rm?(j)|ra?(m)|smi?(l))' realplay - complete -f -X '!*.@(mpg|mpeg|avi|mov|qt)' xanim -@@ -5888,7 +5888,7 @@ _mplayer() - -xvidencopts -of --verbose' -- $cur) ) - ;; - *) -- _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|fli|FLI|viv|VIV|rm?(j)|RM?(J)|ra?(m)|RA?(M)|yuv|YUV|mov|MOV|qt|QT|mp[34]|MP[34]|og[gm]|OG[GM]|wav|WAV|dump|DUMP|mkv|MKV|m4a|M4A|aac|AAC|m2v|M2V|dv|DV|rmvb|RMVB|mid|MID|ts|TS|3gp|mpc|MPC|flac|FLAC)' -+ _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]|og[gm]|OG[GM]|wav|WAV|dump|DUMP|mkv|MKV|m4a|M4A|aac|AAC|m2v|M2V|dv|DV|rmvb|RMVB|mid|MID|ts|TS|3gp|mpc|MPC|flac|FLAC|vdr|VDR)' - ;; - esac - diff --git a/bash-completion-20060301-perl-299571.patch b/bash-completion-20060301-perl-299571.patch deleted file mode 100644 index f200017..0000000 --- a/bash-completion-20060301-perl-299571.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- bash_completion~ 2007-09-22 10:35:56.000000000 +0300 -+++ bash_completion 2007-09-22 10:37:56.000000000 +0300 -@@ -5196,8 +5196,8 @@ - ;; - esac - -- # handle case where first parameter is not a dash option -- if [ $COMP_CWORD -eq 1 ] && [[ "$cur" != -* ]]; then -+ # handle non-dash options -+ if [[ "$cur" != -* ]]; then - _filedir - return 0 - fi diff --git a/bash-completion-20060301-rpm-backups.patch b/bash-completion-20060301-rpm-backups.patch deleted file mode 100644 index 8f72f08..0000000 --- a/bash-completion-20060301-rpm-backups.patch +++ /dev/null @@ -1,43 +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:12:11.000000000 +0300 -@@ -348,10 +348,10 @@ _services() - 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 ) ) -@@ -8679,7 +8679,7 @@ _update_rc_d() - [ -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 ) - -@@ -8745,7 +8745,7 @@ _invoke_rc_d() - [ -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 ) - -@@ -9281,7 +9281,7 @@ unset list - 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-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-scp-apos-217178.patch b/bash-completion-20060301-scp-apos-217178.patch deleted file mode 100644 index e931bd8..0000000 --- a/bash-completion-20060301-scp-apos-217178.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- bash_completion~ 2006-03-01 18:20:18.000000000 +0200 -+++ bash_completion 2006-12-26 14:01:59.000000000 +0200 -@@ -2589,6 +2589,7 @@ - COMPREPLY=( $( ssh -o 'Batchmode yes' $userhost \ - command ls -aF1d "$path*" 2>/dev/null | \ - sed -e 's/[][(){}<>",:;^&!$&=?`|\ ]/\\\\\\&/g' \ -+ -e "s/'/\\\\\\\\\\\\&/g" \ - -e 's/[*@|=]$//g' -e 's/[^\/]$/& /g' ) ) - return 0 - fi -@@ -2597,6 +2598,7 @@ - COMPREPLY=( ${COMPREPLY[@]} $( command ls -aF1d $cur* \ - 2>/dev/null | sed \ - -e 's/[][(){}<>",:;^&!$&=?`|\ ]/\\&/g' \ -+ -e "s/'/\\\\&/g" \ - -e 's/[*@|=]$//g' -e 's/[^\/]$/& /g' ) ) - return 0 - } 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-svn-filenames-430059.patch b/bash-completion-20060301-svn-filenames-430059.patch deleted file mode 100644 index ca15eb2..0000000 --- a/bash-completion-20060301-svn-filenames-430059.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up bash_completion~ bash_completion ---- bash_completion~ 2006-03-01 18:20:18.000000000 +0200 -+++ bash_completion 2008-01-24 20:21:12.000000000 +0200 -@@ -9083,7 +9083,7 @@ _svn() - - return 0 - } --complete -F _svn $default svn -+complete -F _svn $filenames svn - - _svnadmin() - { diff --git a/bash-completion-lzop b/bash-completion-lzop deleted file mode 100644 index 7f169d1..0000000 --- a/bash-completion-lzop +++ /dev/null @@ -1,43 +0,0 @@ -# bash completion for lzop(1) -*- sh -*- -# -have lzop && -_lzop() -{ - local cur prev xspec IFS=$' \t\n' - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - prev=${COMP_WORDS[COMP_CWORD-1]} - - 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 \ - --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 ) ) - return 0 - fi - - 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 - - _expand || return 0 - - COMPREPLY=( $( compgen -f -X "$xspec" -- $cur ) \ - $( compgen -d -- $cur ) ) -} && -complete -F _lzop $filenames lzop diff --git a/bash-completion-mock b/bash-completion-mock index a508eb6..eabdeb7 100644 --- a/bash-completion-mock +++ b/bash-completion-mock @@ -1,68 +1,79 @@ -# bash completion for mock -*- sh -*- - -# TODO: --copyin, --copyout +# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*- +# ex: ts=8 sw=8 noet filetype=sh +# +# bash completion for mock _mock() { - local cur prev plugins cfgdir + local cur prev plugins cfgdir - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - prev=${COMP_WORDS[COMP_CWORD-1]} - plugins='ccache yum_cache root_cache bind_mount' - cfgdir=/etc/mock + COMPREPLY=() + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + plugins='tmpfs root_cache yum_cache bind_mount ccache' + cfgdir=/etc/mock - count=0 - for i in ${COMP_WORDS[@]} ; do - [ $count -eq $COMP_CWORD ] && break - if [[ "$i" == --configdir ]] ; then - cfgdir="${COMP_WORDS[((count+1))]}" - elif [[ "$i" == --configdir=* ]] ; then - cfgdir=${i/*=/} - fi - count=$((++count)) - done + count=0 + for i in "${COMP_WORDS[@]}" ; do + [ $count -eq $COMP_CWORD ] && break + if [[ "$i" == --configdir ]] ; then + cfgdir="${COMP_WORDS[((count+1))]}" + elif [[ "$i" == --configdir=* ]] ; then + cfgdir=${i/*=/} + fi + count=$((++count)) + done - case $prev in - -r) - COMPREPLY=( $( command ls $cfgdir | \ - sed -ne 's/^\('$cur'.*\)\.cfg$/\1/p') ) - return 0 - ;; - -@(-help|h)) - return 0 - ;; - esac + # --name=value style option + if [[ "$cur" == --?*=* ]] ; then + prev="${cur/=*}" + cur="${cur#$prev=}" + fi - # --name=value style option - if [[ "$cur" == *=* ]] ; then - prev=${cur/=*/} - cur=${cur/*=/} - case $prev in - --@(config|result)dir) - _filedir -d - return 0 - ;; - --@(en|dis)able-plugin) - COMPREPLY=( $( compgen -W "$plugins" -- $cur ) ) - return 0 - ;; - --@(arch|define|with|without|uniqueext|rpmbuild_timeout)) - return 0 - ;; - esac - fi + case $prev in + -@(h|-help|-copy@(in|out)|-arch|D|-define|-with?(out)|-uniqueext|-rpmbuild_timeout|-sources|-cwd)) + return 0 + ;; + -@(r|-root)) + COMPREPLY=( $( command ls $cfgdir | \ + sed -ne 's/^\('$cur'.*\)\.cfg$/\1/p') ) + return 0 + ;; + --@(config|result)dir) + _filedir -d + return 0 + ;; + --spec) + _filedir spec + return 0 + ;; + --target) + # Yep, compatible archs, not compatible build archs + # (e.g. ix86 chroot builds in x86_64 mock host) + # This would actually depend on what the target root + # can be used to build for... + COMPREPLY=( $( compgen -W "$( command rpm --showrc | sed -ne 's/^\s*compatible\s\+archs\s*:\s*\(.*\)/\1/i p' )" -- $cur ) ) + return 0 + ;; + --@(en|dis)able-plugin) + COMPREPLY=( $( compgen -W "$plugins" -- $cur ) ) + return 0 + ;; + esac - if [[ "$cur" == -* ]] ; then - COMPREPLY=( $( compgen -W '--version -h --help --rebuild --chroot \ - --shell --clean --init --installdeps --install --update \ - --orphanskill -r --offline --no-clean --cleanup-after \ - --no-cleanup-after --arch= --define= --with= --without= \ - --resultdir= --uniqueext= --configdir= --rpmbuild_timeout -v \ - --verbose -q --quiet --trace --enable-plugin= --disable-plugin=' \ - -- $cur ) ) - else - _filedir '?(no)src.rpm' - fi + if [[ "$cur" == -* ]] ; then + COMPREPLY=( $( compgen -W '--version -h --help --rebuild \ + --buildsrpm --shell --chroot --clean --init \ + --installdeps --install --update --orphanskill \ + --copyin --copyout -r --root --offline --no-clean \ + --cleanup-after --no-cleanup-after --arch --target \ + -D --define --with --without --resultdir --uniqueext \ + --configdir --rpmbuild_timeout --unpriv --cwd --spec \ + --sources -v --verbose -q --quiet --trace \ + --enable-plugin --disable-plugin --print-root-path' \ + -- $cur ) ) + else + _filedir '?(no)src.rpm' + fi } complete -F _mock $filenames mock diff --git a/bash-completion-plague-client b/bash-completion-plague-client index db572ba..31a8802 100644 --- a/bash-completion-plague-client +++ b/bash-completion-plague-client @@ -1,16 +1,20 @@ -# bash completion for plague-client -*- sh -*- +# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*- +# ex: ts=8 sw=8 noet filetype=sh + +# bash completion for plague-client _plague_client() { - local cur + local cur - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} + COMPREPLY=() + cur=`_get_cword` - [ $COMP_CWORD = 1 ] && \ - COMPREPLY=( $( compgen -W 'build detail finish help is_paused kill list \ - list_builders pause requeue unpause update_builders' -- $cur ) ) + [ $COMP_CWORD = 1 ] && \ + COMPREPLY=( $( compgen -W 'build detail finish help is_paused \ + kill list list_builders pause requeue unpause \ + update_builders' -- $cur ) ) - return 0 + return 0 } complete -F _plague_client plague-client diff --git a/bash-completion-repomanage b/bash-completion-repomanage index fd0ada1..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=${COMP_WORDS[COMP_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.spec b/bash-completion.spec index 382566f..4846dbf 100644 --- a/bash-completion.spec +++ b/bash-completion.spec @@ -1,32 +1,24 @@ Name: bash-completion -Version: 20060301 -Release: 13 +Version: 1.0 +Release: 2%{?dist} +Epoch: 1 Summary: Programmable completion for Bash Group: System Environment/Shells License: GPLv2+ -URL: http://www.caliban.org/bash/ -Source0: http://www.caliban.org/files/bash/%{name}-%{version}.tar.bz2 -Source1: %{name}-lzop -Source2: %{name}-mock +URL: http://bash-completion.alioth.debian.org/ +Source0: http://bash-completion.alioth.debian.org/files/%{name}-%{version}.tar.gz +Source1: %{name}-mock +Source2: %{name}-plague-client Source3: %{name}-repomanage -Source4: %{name}-plague-client -Patch0: %{name}-20060301-scp-apos-217178.patch -Patch1: %{name}-20060301-debian.patch -Patch2: %{name}-20060301-perl-299571.patch -Patch3: %{name}-20060301-jpeg2000-304771.patch -Patch4: %{name}-20060301-mediafiles-444467.patch -Patch5: %{name}-20060301-svn-filenames-430059.patch -Patch6: %{name}-20060301-gzip.patch -Patch7: %{name}-20060301-lzma.patch -Patch8: %{name}-20060301-rpm-backups.patch -Patch9: %{name}-20060301-rpm-eval.patch -Patch10: %{name}-20060301-getent.patch -Patch11: %{name}-20060301-sqlite.patch +# http://git.debian.org/?p=bash-completion/bash-completion.git;a=commitdiff;h=1421e55aac075e13491cd212b796bdd453214a2c +Patch0: %{name}-1.0-bash4quoting-490322.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch Requires: bash >= 2.05-12 +# For symlinking in triggers, #490768 +Requires: coreutils %description bash-completion is a collection of shell functions that take advantage @@ -34,24 +26,11 @@ of the programmable completion feature of bash 2. %prep -%setup -q -n bash_completion -%patch0 -%patch1 -%patch2 -%patch3 -%patch4 -%patch5 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 -f=Changelog ; iconv -f iso-8859-1 -t utf-8 $f > $f.utf8 ; mv $f.utf8 $f -install -pm 644 %{SOURCE1} contrib/lzop -install -pm 644 %{SOURCE2} contrib/mock +%setup -q +%patch0 -p1 +install -pm 644 %{SOURCE1} contrib/mock +install -pm 644 %{SOURCE2} contrib/plague-client install -pm 644 %{SOURCE3} contrib/repomanage -install -pm 644 %{SOURCE4} contrib/plague-client %build @@ -81,13 +60,18 @@ 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 %triggerun -- bittorrent %do_triggerun bittorrent +%triggerin -- bridge-utils +%do_triggerin brctl +%triggerun -- bridge-utils +%do_triggerun brctl + %triggerin -- cksfv %do_triggerin cksfv %triggerun -- cksfv @@ -98,6 +82,11 @@ rm -rf $RPM_BUILD_ROOT %triggerun -- clisp %do_triggerun clisp +%triggerin -- cowsay +%do_triggerin cowsay +%triggerun -- cowsay +%do_triggerun cowsay + %triggerin -- dsniff %do_triggerin dsniff %triggerun -- dsniff @@ -123,11 +112,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 @@ -143,21 +142,41 @@ rm -rf $RPM_BUILD_ROOT %triggerun -- mcrypt %do_triggerun mcrypt -%triggerin -- mercurial -%do_triggerin hg -%triggerun -- mercurial -%do_triggerun hg +%triggerin -- minicom +%do_triggerin minicom +%triggerun -- minicom +%do_triggerun minicom %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 -- net-tools +%do_triggerin net-tools +%triggerun -- net-tools +%do_triggerun net-tools + +%triggerin -- openssh-clients +%do_triggerin ssh +%triggerun -- openssh-clients +%do_triggerun ssh + +%triggerin -- perl-CPANPLUS +%do_triggerin cpan2dist +%triggerun -- perl-CPANPLUS +%do_triggerun cpan2dist + %triggerin -- perl-SVK %do_triggerin svk %triggerun -- perl-SVK @@ -168,6 +187,26 @@ rm -rf $RPM_BUILD_ROOT %triggerun -- plague-client %do_triggerun plague-client +%triggerin -- qemu +%do_triggerin qemu +%triggerun -- qemu +%do_triggerun qemu + +%triggerin -- quota +%do_triggerin quota-tools +%triggerun -- quota +%do_triggerun quota-tools + +%triggerin -- qt +%do_triggerin qdbus +%triggerun -- qt +%do_triggerun qdbus + +%triggerin -- rdesktop +%do_triggerin rdesktop +%triggerun -- rdesktop +%do_triggerun rdesktop + %triggerin -- ruby-ri %do_triggerin ri %triggerun -- ruby-ri @@ -188,6 +227,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 @@ -208,10 +252,15 @@ rm -rf $RPM_BUILD_ROOT %triggerun -- yum-utils %do_triggerun repomanage +%triggerin -- vnc +%do_triggerin vncviewer +%triggerun -- vnc +%do_triggerun vncviewer + %files -f %{name}-ghosts.list %defattr(-,root,root,-) -%doc BUGS Changelog COPYING README +%doc AUTHORS CHANGES COPYING README TODO %config(noreplace) %{_sysconfdir}/profile.d/bash_completion.sh %{_sysconfdir}/bash_completion %dir %{_sysconfdir}/bash_completion.d/ @@ -219,6 +268,42 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Apr 7 2009 Ville Skyttä - 1:1.0-2 +- Apply upstream patch to fix quoting issues with bash 4.x (#490322). + +* Mon Apr 6 2009 Ville Skyttä - 1:1.0-1 +- 1.0. + +* Mon Mar 23 2009 Ville Skyttä - 20080705-4.20090314gitf4f0984 +- Add dependency on coreutils for triggers (#490768). +- Update and improve mock completion. + +* Sun Mar 15 2009 Ville Skyttä - 20080705-3.20090314gitf4f0984 +- git snapshot f4f0984, fixes #484578 (another issue), #486998. + +* Mon Feb 23 2009 Fedora Release Engineering - 20080705-3.20090211git47d0c5b +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Wed Feb 11 2009 Ville Skyttä - 20080705-2.20090211git47d0c5b +- git snapshot 47d0c5b, fixes #484578. +- lzop and repomanage completions included upstream. + +* 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. +- Patch to improve man completion: more sections, better filename handling. +- Patch to speed up yum install/deplist completion (#478784). +- Patch to fix and speed up rpm installed packages completion. +- Update mock completion. + +* Thu Sep 25 2008 Ville Skyttä +- More Matroska associations (#463829, based on patch from Yanko Kaneti). + * Thu Sep 11 2008 Ville Skyttä - 20060301-13 - Borrow/improve/adapt to Fedora some patches from Mandriva: improved support for getent and rpm --eval, better rpm backup file avoidance, lzma support. diff --git a/sources b/sources index a4c62cd..00208f6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ed95a89f57357a42b8e4eb95487bf9d0 bash-completion-20060301.tar.bz2 +cd1c5648272917fbe0eef4ba30bb93f4 bash-completion-1.0.tar.gz