From 7ef492a5cc6ddc8d701095208a413b90b59fa04f Mon Sep 17 00:00:00 2001 From: Ville Skyttä Date: Mar 12 2010 19:25:22 +0000 Subject: - Apply upstream post 1.1 service argument fix (#572794). 1.1-5 - Apply upstream post 1.1 generic vncviewer fixes. - Autoinstall vncviewer completion also on tigervnc. - Autoinstall chsh completion also on util-linux. --- diff --git a/bash-completion-1.1-service.patch b/bash-completion-1.1-service.patch new file mode 100644 index 0000000..e1555db --- /dev/null +++ b/bash-completion-1.1-service.patch @@ -0,0 +1,25 @@ +From 3a205c536c3c811b393d635799d19cf9209ca84a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ville=20Skytt=C3=A4?= +Date: Tue, 3 Nov 2009 23:36:01 +0200 +Subject: [PATCH] Fix service argument completion. + +--- + bash_completion | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/bash_completion b/bash_completion +index e1c4054..6f1978c 100644 +--- a/bash_completion ++++ b/bash_completion +@@ -757,7 +757,7 @@ deinstall clean clean-depends kernel buildworld' make + _services + else + COMPREPLY=( $( compgen -W '`sed -ne "y/|/ /; \ +- s/^.*\(U\|msg_u\)sage.*{\(.*\)}.*$/\1/p" \ ++ s/^.*\(U\|msg_u\)sage.*{\(.*\)}.*$/\2/p" \ + $sysvdir/${prev##*/} 2>/dev/null`' -- "$cur" ) ) + fi + +-- +1.7.0 + diff --git a/bash-completion-1.1-vncviewer.patch b/bash-completion-1.1-vncviewer.patch new file mode 100644 index 0000000..6de66a7 --- /dev/null +++ b/bash-completion-1.1-vncviewer.patch @@ -0,0 +1,43 @@ +diff --git a/contrib/vncviewer b/contrib/vncviewer +index 1e6e3eb..d3e5c59 100644 +--- a/contrib/vncviewer ++++ b/contrib/vncviewer +@@ -1,22 +1,27 @@ + # bash completion for vncviewer + + have vncviewer && +-_vncviewer_bootstrap() { ++_vncviewer_bootstrap() ++{ + local fname + case "$(_realcommand vncviewer)" in +- # If `vncviewer' not installed, default file-dir completion +- '') _filedir `_get_cword` ;; + *xvnc4viewer) fname=_xvnc4viewer ;; +- *tightvncviewer|*) fname=_tightvncviewer ;; ++ *tightvncviewer) fname=_tightvncviewer ;; ++ *) fname=_vncviewer ;; + esac +- if [ $fname ]; then +- # Install real completion for subsequent completions +- complete -F $fname vncviewer +- $fname # Generate completions once for now +- unset -f _vncviewer_bootstrap +- fi ++ ++ # Install real completion for subsequent completions ++ complete -F $fname vncviewer ++ $fname # Generate completions once for now ++ unset -f _vncviewer_bootstrap + } && +-complete -F _vncviewer_bootstrap vncviewer ++complete -F _vncviewer_bootstrap vncviewer && ++_vncviewer() ++{ ++ COMPREPLY=() ++ local cur=`_get_cword` ++ _known_hosts_real "$cur" ++} + + have tightvncviewer && + _tightvncviewer() diff --git a/bash-completion.spec b/bash-completion.spec index f35c142..e2a155e 100644 --- a/bash-completion.spec +++ b/bash-completion.spec @@ -1,6 +1,6 @@ Name: bash-completion Version: 1.1 -Release: 4%{?dist} +Release: 6%{?dist} Epoch: 1 Summary: Programmable completion for Bash @@ -13,6 +13,9 @@ Source1: %{name}-plague-client Source2: http://bash-completion.alioth.debian.org/files/CHANGES-1.1 # http://git.debian.org/?p=bash-completion/bash-completion.git;a=blob_plain;f=bash_completion.sh;h=915960b614ef7644f9abaa99ed9ef0faa7ac5477;hb=HEAD Source3: bash_completion.sh +# From upstream post 1.1. +Patch0: %{name}-1.1-vncviewer.patch +Patch1: %{name}-1.1-service.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -27,6 +30,8 @@ of the programmable completion feature of bash 2. %prep %setup -q +%patch0 -p1 +%patch1 -p1 install -pm 644 %{SOURCE1} contrib/plague-client install -pm 644 %{SOURCE2} CHANGES install -pm 644 %{SOURCE3} bash_completion.sh @@ -122,7 +127,7 @@ rm -rf $RPM_BUILD_ROOT %bashcomp_trigger bzip2 %bashcomp_trigger cfengine %bashcomp_trigger chkconfig -%bashcomp_trigger chsh util-linux-ng +%bashcomp_trigger chsh util-linux-ng,util-linux %bashcomp_trigger cksfv %bashcomp_trigger clisp %bashcomp_trigger cpan2dist perl-CPANPLUS @@ -246,7 +251,7 @@ fi %bashcomp_trigger tcpdump %bashcomp_trigger unace %bashcomp_trigger unrar -%bashcomp_trigger vncviewer vnc +%bashcomp_trigger vncviewer tigervnc,vnc %bashcomp_trigger vpnc %bashcomp_trigger wireless-tools %bashcomp_trigger wodim @@ -289,6 +294,14 @@ fi %changelog +* Thu Mar 11 2010 Todd Zullinger - 1:1.1-6 +- Apply upstream post 1.1 service argument fix (#572794). + +* Sat Dec 26 2009 Ville Skyttä - 1:1.1-5 +- Apply upstream post 1.1 generic vncviewer fixes. +- Autoinstall vncviewer completion also on tigervnc. +- Autoinstall chsh completion also on util-linux. + * Tue Dec 15 2009 Ville Skyttä - 1:1.1-4 - Fix autoinstall of completions named other than the package (#546905). - Use environment-modules upstream completion instead of ours if available.