- Apply upstream post 1.2 /etc/init.d/* completion improvements to fix
#608351.
This commit is contained in:
parent
fff27fb092
commit
7ef2069fdd
19
bash-completion-1.2-init.d.patch
Normal file
19
bash-completion-1.2-init.d.patch
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
diff --git a/contrib/service b/contrib/service
|
||||||
|
index 9ebd117..6efd7c1 100644
|
||||||
|
--- a/contrib/service
|
||||||
|
+++ b/contrib/service
|
||||||
|
@@ -32,9 +32,11 @@ _service()
|
||||||
|
return 0
|
||||||
|
} &&
|
||||||
|
complete -F _service service
|
||||||
|
-[ -d /etc/init.d/ ] && complete -F _service -o default \
|
||||||
|
- $(for i in /etc/init.d/*; do
|
||||||
|
- complete -p ${i##*/} &>/dev/null || printf '%s\n' ${i##*/}; done)
|
||||||
|
+for svc in /etc/init.d/*; do
|
||||||
|
+ [ ! -x "$svc" ] || complete -p "${svc##*/}" &>/dev/null || \
|
||||||
|
+ complete -F _service -o default "${svc##*/}"
|
||||||
|
+done
|
||||||
|
+unset svc
|
||||||
|
|
||||||
|
# Local variables:
|
||||||
|
# mode: shell-script
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
Name: bash-completion
|
Name: bash-completion
|
||||||
Version: 1.2
|
Version: 1.2
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Summary: Programmable completion for Bash
|
Summary: Programmable completion for Bash
|
||||||
|
|
||||||
@ -12,6 +12,8 @@ License: GPLv2+
|
|||||||
URL: http://bash-completion.alioth.debian.org/
|
URL: http://bash-completion.alioth.debian.org/
|
||||||
Source0: http://bash-completion.alioth.debian.org/files/%{name}-%{version}.tar.bz2
|
Source0: http://bash-completion.alioth.debian.org/files/%{name}-%{version}.tar.bz2
|
||||||
Source1: %{name}-plague-client
|
Source1: %{name}-plague-client
|
||||||
|
# From upstream post-1.2 git
|
||||||
|
Patch0: %{name}-1.2-init.d.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
@ -31,6 +33,7 @@ of the programmable completion feature of bash.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
install -pm 644 %{SOURCE1} contrib/plague-client
|
install -pm 644 %{SOURCE1} contrib/plague-client
|
||||||
|
|
||||||
# Updated completions shipped upstream:
|
# Updated completions shipped upstream:
|
||||||
@ -346,6 +349,9 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jun 28 2010 Ville Skyttä <ville.skytta@iki.fi> - 1:1.2-2
|
||||||
|
- Apply upstream post 1.2 /etc/init.d/* completion improvements to fix #608351.
|
||||||
|
|
||||||
* Wed Jun 16 2010 Ville Skyttä <ville.skytta@iki.fi> - 1:1.2-1
|
* Wed Jun 16 2010 Ville Skyttä <ville.skytta@iki.fi> - 1:1.2-1
|
||||||
- Update to 1.2, all patches applied upstream.
|
- Update to 1.2, all patches applied upstream.
|
||||||
- Fixes #444469, #538433, #541423, and #601813, works around #585384.
|
- Fixes #444469, #538433, #541423, and #601813, works around #585384.
|
||||||
|
Loading…
Reference in New Issue
Block a user