Update to 1.99.
This commit is contained in:
parent
6c1548a4c4
commit
d1d1afae6d
@ -1,36 +0,0 @@
|
|||||||
# This is a copy of the _filedir function in bash_completion, included
|
|
||||||
# and (re)defined separately here because some versions of Adobe Reader,
|
|
||||||
# if installed, are known to override this function with an incompatible
|
|
||||||
# version, causing various problems.
|
|
||||||
#
|
|
||||||
# https://bugzilla.redhat.com/677446
|
|
||||||
# http://forums.adobe.com/thread/745833
|
|
||||||
|
|
||||||
_filedir()
|
|
||||||
{
|
|
||||||
local i IFS=$'\n' xspec
|
|
||||||
|
|
||||||
_tilde "$cur" || return 0
|
|
||||||
|
|
||||||
local -a toks
|
|
||||||
local quoted tmp
|
|
||||||
|
|
||||||
_quote_readline_by_ref "$cur" quoted
|
|
||||||
toks=( ${toks[@]-} $(
|
|
||||||
compgen -d -- "$quoted" | {
|
|
||||||
while read -r tmp; do
|
|
||||||
printf '%s\n' $tmp
|
|
||||||
done
|
|
||||||
}
|
|
||||||
))
|
|
||||||
|
|
||||||
if [[ "$1" != -d ]]; then
|
|
||||||
[[ ${BASH_VERSINFO[0]} -ge 4 ]] && \
|
|
||||||
xspec=${1:+"!*.@($1|${1^^})"} || \
|
|
||||||
xspec=${1:+"!*.@($1|$(printf %s $1 | tr '[:lower:]' '[:upper:]'))"}
|
|
||||||
toks=( ${toks[@]-} $( compgen -f -X "$xspec" -- $quoted) )
|
|
||||||
fi
|
|
||||||
[ ${#toks[@]} -ne 0 ] && _compopt_o_filenames
|
|
||||||
|
|
||||||
COMPREPLY=( "${COMPREPLY[@]}" "${toks[@]}" )
|
|
||||||
}
|
|
@ -1,21 +0,0 @@
|
|||||||
diff -up bash-completion-1.90/bash_completion~ bash-completion-1.90/bash_completion
|
|
||||||
--- bash-completion-1.90/bash_completion~ 2011-11-03 11:51:35.000000000 +0200
|
|
||||||
+++ bash-completion-1.90/bash_completion 2011-11-04 21:34:14.073711442 +0200
|
|
||||||
@@ -45,7 +45,7 @@ readonly BASH_COMPLETION_COMPAT_DIR
|
|
||||||
|
|
||||||
# Blacklisted completions, causing problems with our code.
|
|
||||||
#
|
|
||||||
-_blacklist_glob='@(acroread.sh)'
|
|
||||||
+_blacklist_glob='@()'
|
|
||||||
|
|
||||||
# Turn on extended globbing and programmable completion
|
|
||||||
shopt -s extglob progcomp
|
|
||||||
@@ -1878,7 +1878,7 @@ if [[ -d $BASH_COMPLETION_COMPAT_DIR &&
|
|
||||||
&& -f $i && -r $i ]] && . "$i"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
-unset i
|
|
||||||
+unset i _blacklist_glob
|
|
||||||
|
|
||||||
# source user completion file
|
|
||||||
[[ ${BASH_SOURCE[0]} != ~/.bash_completion && -r ~/.bash_completion ]] \
|
|
12
bash-completion-1.99-noblacklist.patch
Normal file
12
bash-completion-1.99-noblacklist.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
diff -up bash-completion-1.99/bash_completion~ bash-completion-1.99/bash_completion
|
||||||
|
--- bash-completion-1.99/bash_completion~ 2012-01-08 01:03:46.000000000 +0200
|
||||||
|
+++ bash-completion-1.99/bash_completion 2012-01-08 13:50:33.412012530 +0200
|
||||||
|
@@ -45,7 +45,7 @@ readonly BASH_COMPLETION_COMPAT_DIR
|
||||||
|
|
||||||
|
# Blacklisted completions, causing problems with our code.
|
||||||
|
#
|
||||||
|
-_blacklist_glob='@(acroread.sh)'
|
||||||
|
+_blacklist_glob='@()'
|
||||||
|
|
||||||
|
# Turn on extended globbing and programmable completion
|
||||||
|
shopt -s extglob progcomp
|
@ -41,7 +41,9 @@ _filedir()
|
|||||||
-n "$1" && "$1" != -d && ${#toks[@]} -lt 1 ]] && \
|
-n "$1" && "$1" != -d && ${#toks[@]} -lt 1 ]] && \
|
||||||
toks+=( $( compgen -f -- $quoted ) )
|
toks+=( $( compgen -f -- $quoted ) )
|
||||||
|
|
||||||
[ ${#toks[@]} -ne 0 ] && compopt -o filenames 2>/dev/null
|
if [[ ${#toks[@]} -ne 0 ]]; then
|
||||||
|
# 2>/dev/null for direct invocation, e.g. in the _filedir unit test
|
||||||
COMPREPLY+=( "${toks[@]}" )
|
compopt -o filenames 2>/dev/null
|
||||||
|
COMPREPLY+=( "${toks[@]}" )
|
||||||
|
fi
|
||||||
} # _filedir()
|
} # _filedir()
|
@ -1,15 +0,0 @@
|
|||||||
# -*- mode: shell-script; sh-basic-offset: 4; indent-tabs-mode: nil -*-
|
|
||||||
# ex: ts=8 sw=8 noet filetype=sh
|
|
||||||
|
|
||||||
# bash completion for plague-client
|
|
||||||
|
|
||||||
_plague_client()
|
|
||||||
{
|
|
||||||
local cur prev words cword
|
|
||||||
_init_completion || return
|
|
||||||
|
|
||||||
[[ $cword -eq 1 ]] && \
|
|
||||||
COMPREPLY=( $( compgen -W 'build detail finish help is_paused kill list
|
|
||||||
list_builders pause requeue unpause update_builders' -- "$cur" ) )
|
|
||||||
} &&
|
|
||||||
complete -F _plague_client plague-client
|
|
@ -2,7 +2,7 @@
|
|||||||
%bcond_with tests
|
%bcond_with tests
|
||||||
|
|
||||||
Name: bash-completion
|
Name: bash-completion
|
||||||
Version: 1.90
|
Version: 1.99
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Summary: Programmable completion for Bash
|
Summary: Programmable completion for Bash
|
||||||
@ -10,13 +10,11 @@ Summary: Programmable completion for Bash
|
|||||||
License: GPLv2+
|
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
|
||||||
# In upstream post-1.90 git:
|
|
||||||
Source1: %{name}-plague-client
|
|
||||||
Source2: CHANGES.package.old
|
Source2: CHANGES.package.old
|
||||||
# https://bugzilla.redhat.com/677446, see also noblacklist patch
|
# https://bugzilla.redhat.com/677446, see also noblacklist patch
|
||||||
Source3: %{name}-1.90-redefine_filedir.bash
|
Source3: %{name}-1.99-redefine_filedir.bash
|
||||||
# https://bugzilla.redhat.com/677446, see also filedir source
|
# https://bugzilla.redhat.com/677446, see also filedir source
|
||||||
Patch0: %{name}-1.90-noblacklist.patch
|
Patch0: %{name}-1.99-noblacklist.patch
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%if %{with tests}
|
%if %{with tests}
|
||||||
@ -44,8 +42,6 @@ make %{?_smp_mflags}
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
make install DESTDIR=$RPM_BUILD_ROOT
|
make install DESTDIR=$RPM_BUILD_ROOT
|
||||||
install -pm 644 %{SOURCE1} \
|
|
||||||
$RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/plague-client
|
|
||||||
|
|
||||||
# Updated completion shipped in cowsay package:
|
# Updated completion shipped in cowsay package:
|
||||||
rm $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/{cowsay,cowthink}
|
rm $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/{cowsay,cowthink}
|
||||||
@ -53,10 +49,6 @@ rm $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/{cowsay,cowthink}
|
|||||||
install -Dpm 644 %{SOURCE3} \
|
install -Dpm 644 %{SOURCE3} \
|
||||||
$RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/redefine_filedir
|
$RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/redefine_filedir
|
||||||
|
|
||||||
# Fixed in upstream post-1.90 git:
|
|
||||||
chmod -c 644 $RPM_BUILD_ROOT%{_datadir}/bash-completion/bash_completion
|
|
||||||
install -dm 755 $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d
|
|
||||||
|
|
||||||
|
|
||||||
%if %{with tests}
|
%if %{with tests}
|
||||||
%check
|
%check
|
||||||
@ -82,6 +74,9 @@ exit $result
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Jan 8 2012 Ville Skyttä <ville.skytta@iki.fi> - 1:1.99-1
|
||||||
|
- Update to 1.99.
|
||||||
|
|
||||||
* Fri Nov 4 2011 Ville Skyttä <ville.skytta@iki.fi> - 1:1.90-1
|
* Fri Nov 4 2011 Ville Skyttä <ville.skytta@iki.fi> - 1:1.90-1
|
||||||
- Update to 1.90.
|
- Update to 1.90.
|
||||||
- Specfile cleanups.
|
- Specfile cleanups.
|
||||||
|
Loading…
Reference in New Issue
Block a user