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 1cfc478..0000000 --- a/bash-completion-20060301-debian.patch +++ /dev/null @@ -1,20 +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 - # -@@ -3325,7 +3323,7 @@ - have bzip2 && - _bzip2() - { -- local cur prev xspec -+ local cur prev xspec IFS=$'\t\n' - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} 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-mock b/bash-completion-mock index 767ebda..eabdeb7 100644 --- a/bash-completion-mock +++ b/bash-completion-mock @@ -1,44 +1,79 @@ -# bash completion for mock -*- sh -*- +# -*- 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 commands cfgdir + local cur prev plugins cfgdir - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - prev=${COMP_WORDS[COMP_CWORD-1]} - commands='rebuild chroot init clean shell' - 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 - [ "$i" == --configdir ] && cfgdir="${COMP_WORDS[((count+1))]}" - 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 - --@(config|result|state)dir) - _filedir -d - return 0 - ;; - -r) - COMPREPLY=( $( command ls $cfgdir | \ - sed -ne 's/^\('$cur'.*\)\.cfg$/\1/p') ) - return 0 - ;; - -@(-arch|-uniqueext|-help|h)) - return 0 - ;; - esac + # --name=value style option + if [[ "$cur" == --?*=* ]] ; then + prev="${cur/=*}" + cur="${cur#$prev=}" + fi - # TODO: process $commands - if [[ "$cur" == -* ]] ; then - COMPREPLY=( $( compgen -W '--version -h --help -r --no-clean --arch \ - --debug --resultdir --statedir --uniqueext --configdir --quiet \ - --autocache --rebuildcache' -- $cur ) ) - else - _filedir '?(no)src.rpm' - 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 \ + --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 be0a16b..4846dbf 100644 --- a/bash-completion.spec +++ b/bash-completion.spec @@ -1,21 +1,24 @@ Name: bash-completion -Version: 20060301 -Release: 4%{?dist} +Version: 1.0 +Release: 2%{?dist} +Epoch: 1 Summary: Programmable completion for Bash Group: System Environment/Shells -License: GPL -URL: http://www.caliban.org/bash/ -Source0: http://www.caliban.org/files/bash/%{name}-%{version}.tar.bz2 -Source2: %{name}-mock +License: GPLv2+ +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 +# 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 @@ -23,12 +26,10 @@ of the programmable completion feature of bash 2. %prep -%setup -q -n bash_completion -%patch0 -%patch1 -f=Changelog ; iconv -f iso-8859-1 -t utf-8 $f > $f.utf8 ; mv $f.utf8 $f -install -pm 644 %{SOURCE2} contrib/mock -install -pm 644 %{SOURCE3} contrib/plague-client +%setup -q +%patch0 -p1 +install -pm 644 %{SOURCE1} contrib/mock +install -pm 644 %{SOURCE2} contrib/plague-client install -pm 644 %{SOURCE3} contrib/repomanage @@ -59,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, dsniff, harbour, larch, lisp, p4, povray, sitecopy +# 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 @@ -76,6 +82,16 @@ 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 +%do_triggerun dsniff + %triggerin -- freeciv %do_triggerin freeciv %triggerun -- freeciv @@ -96,11 +112,26 @@ 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 +%do_triggerun lzop + %triggerin -- mailman %do_triggerin mailman %triggerun -- mailman @@ -111,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 @@ -136,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 @@ -146,11 +217,21 @@ rm -rf $RPM_BUILD_ROOT %triggerun -- sbcl %do_triggerun sbcl +%triggerin -- sitecopy +%do_triggerin sitecopy +%triggerun -- sitecopy +%do_triggerun sitecopy + %triggerin -- snownews %do_triggerin snownews %triggerun -- snownews %do_triggerun snownews +%triggerin -- subversion +%do_triggerin _subversion +%triggerun -- subversion +%do_triggerun _subversion + %triggerin -- unace %do_triggerin unace %triggerun -- unace @@ -171,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/ @@ -182,6 +268,77 @@ 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. +- Patch/unpatch to fix gzip and bzip2 options completion. +- Patch to add --rsyncable to gzip options completion. +- Add and trigger-install support for lzop. +- Associate *.sqlite with sqlite3. + +* Wed Jul 23 2008 Ville Skyttä - 20060301-12 +- Fix plague-client completion install (#456355, Ricky Zhou). +- Trigger-install support for sitecopy. + +* Tue Apr 29 2008 Ville Skyttä - 20060301-11 +- Media player association improvements (#444467). + +* Sat Feb 23 2008 Ville Skyttä - 20060301-10 +- Patch to fix filename completion with svn (#430059). +- Trigger-install support for dsniff. +- Drop disttag. + +* Mon Dec 31 2007 Ville Skyttä - 20060301-8 +- Associate VDR recording files with media players. +- Update mock completion. + +* Fri Nov 16 2007 Ville Skyttä - 20060301-7 +- Add JPEG2000 extensions for display(1) (#304771). +- Update mock completion. + +* Sat Sep 22 2007 Ville Skyttä - 20060301-6 +- Patch to improve perl completion (#299571, Jim Radford, + http://use.perl.org/~Alias/journal/33508). + +* Mon Aug 13 2007 Ville Skyttä - 20060301-5 +- License: GPLv2+ + * Sun Jun 24 2007 Jeff Sheltren - 20060301-4 - Update triggers to work with older versions of RPM 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