Accepting request 58036 from home:vuntz:branches:shells
Thanks for your work. OBS-URL: https://build.opensuse.org/request/show/58036 OBS-URL: https://build.opensuse.org/package/show/shells/bash-completion?expand=0&rev=13
This commit is contained in:
parent
cd89af19c2
commit
838ba54971
36
bash-completion-fix-service.patch
Normal file
36
bash-completion-fix-service.patch
Normal file
@ -0,0 +1,36 @@
|
||||
|
||||
m 1f8b55a92aba6d03bb4c43dade1f8b2e2b847b61 Mon Sep 17 00:00:00 2001
|
||||
From: David Paleino <dapal@debian.org>
|
||||
Date: Thu, 17 Jun 2010 17:43:18 +0200
|
||||
Subject: [PATCH] Fixed "service" completion, thanks to John Hedges (Debian: #586210)
|
||||
|
||||
The patch makes it safe even when every file in /etc/init.d/*
|
||||
has a proper completion (unlikely, but seems like it happened).
|
||||
|
||||
Thanks to John Hedges <john@drystone.co.uk> for the patch, slightly
|
||||
modified to make it more compact.
|
||||
---
|
||||
CHANGES | 2 +-
|
||||
contrib/service | 7 ++++---
|
||||
2 files changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/contrib/service b/contrib/service
|
||||
index 9ebd117..f27222a 100644
|
||||
--- a/contrib/service
|
||||
+++ b/contrib/service
|
||||
@@ -32,9 +32,10 @@ _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)
|
||||
+[ -d /etc/init.d/ ] && (
|
||||
+ services=$(for i in /etc/init.d/*; do
|
||||
+ complete -p ${i##*/} &>/dev/null || printf '%s\n' ${i##*/}; done)
|
||||
+ [ -n "$services" ] && complete -F _service -o default $services;)
|
||||
|
||||
# Local variables:
|
||||
# mode: shell-script
|
||||
--
|
||||
1.7.1
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 13 10:13:48 CET 2011 - vuntz@opensuse.org
|
||||
|
||||
- Add bash-completion-fix-service.patch to fix an error created by
|
||||
the "service" completion.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 7 14:06:29 UTC 2011 - poletti.marco@gmail.com
|
||||
|
||||
|
@ -25,6 +25,8 @@ Summary: Programmable Completion for Bash
|
||||
Url: http://bash-completion.alioth.debian.org/
|
||||
Group: System/Shells
|
||||
Source0: http://bash-completion.alioth.debian.org/files/%{name}-%{version}.tar.bz2
|
||||
# PATCH-FIX-UPSTREAM bash-completion-fix-service.patch vuntz@opensuse.org -- Fix the "service" completion to not create an error, http://git.debian.org/?p=bash-completion/bash-completion.git;a=patch;h=1f8b55a92aba6d03bb4c43dade1f8b2e2b847b61
|
||||
Patch0: bash-completion-fix-service.patch
|
||||
Requires: bash
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildArch: noarch
|
||||
@ -35,6 +37,7 @@ of the programmable completion feature of Bash 2.04 and later.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
%configure
|
||||
|
Loading…
Reference in New Issue
Block a user