Rebase to version 2.11

Resolves: #1782254
This commit is contained in:
Siteshwar Vashisht 2021-01-08 13:21:31 +01:00
parent 17356a9b29
commit aaf4667d24
4 changed files with 7 additions and 57 deletions

View File

@ -1,35 +0,0 @@
diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -121,6 +121,31 @@ A. No. Use `M-/` to (in the words of the bash man page) attempt file
A. Put them in `~/.bash_completion`, which is parsed at the end of the
main completion script. See also the next question.
+**Q. How can I override a completion shipped by bash-completion?**
+
+A. Install a local completion of your own appropriately for the desired
+ command, and it will take precedence over the one shipped by us. See the
+ next answer for details where to install it, if you are doing it on per
+ user basis. If you want to do it system wide, you can install eagerly
+ loaded files in `compatdir` (see a couple of questions further down for
+ more info) and install a completion for the commands to override
+ completions shipped by us.
+
+ If you want to use bash's default completion instead of one of ours,
+ something like this should work (where `$cmd` is the command to override
+ completion for): `complete -o default -o bashdefault $cmd`
+
+**Q. Where should I install my own local completions?**
+
+A. Put them in the `completions` subdir of `$BASH_COMPLETION_USER_DIR`
+ (defaults to `$XDG_DATA_HOME/bash-completion` or
+ `~/.local/share/bash-completion`
+ if `$XDG_DATA_HOME` is not set) to have them loaded on demand.
+ See also the next question's answer for considerations for these
+ files' names, they apply here as well. Alternatively, you can write
+ them directly in `~/.bash_completion` which is loaded eagerly by
+ our main script.
+
**Q. I author/maintain package X and would like to maintain my own
completion code for this package. Where should I put it to be sure
that interactive bash shells will find it and source it?**

View File

@ -1,13 +0,0 @@
diff --git a/completions/rpm b/completions/rpm
index 6b4e66f..c3eed54 100644
--- a/completions/rpm
+++ b/completions/rpm
@@ -151,7 +151,7 @@ _rpm()
--fileprovide --filerequire --filesbypkg --info --list
--obsoletes --pipe --provides --queryformat= --requires
--scripts --suggests --triggers --xml --recommends
- --supplements --filetriggers"
+ --supplements --filetriggers --licensefiles"
if [[ ${words[@]} == *\ -@(*([^ -])f|-file )* ]]; then
# -qf completion

View File

@ -4,8 +4,8 @@
%global _python_bytecompile_errors_terminate_build 0
Name: bash-completion
Version: 2.8
Release: 9%{?dist}
Version: 2.11
Release: 1%{?dist}
Epoch: 1
Summary: Programmable completion for Bash
@ -15,12 +15,6 @@ Source0: https://github.com/scop/bash-completion/releases/download/%{vers
# https://bugzilla.redhat.com/677446, see also redefine_filedir comments
Patch0: %{name}-1.99-noblacklist.patch
# Remove while rebasing to bash-completion-2.9
Patch1: %{name}-2.9-override-completions.patch
# Remove while rebasing to bash-completion-2.9
Patch2: %{name}-rpm-license.patch
BuildArch: noarch
%if %{with tests}
BuildRequires: dejagnu
@ -97,6 +91,10 @@ make -C completions check
%changelog
* Fri Jan 8 13:20:44 CET 2021 Siteshwar Vashisht <svashisht@redhat.com> - 1:2.11-1
- Rebase to version 2.11
Resolves: #1782254
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.8-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (bash-completion-2.8.tar.xz) = d839ef5a98811a2aade7ebdc0bc84c84a41c74db384f89913b06f3c25add1ba22528ac25392b19d27280685d258c74dcdc11247cbaae5b8d82f2c0b546abc268
SHA512 (bash-completion-2.11.tar.xz) = 41585f730b5114d397831ba36d10d05643c6a6179e746ddc49aa1cbef61ea5525fd2f09b2e474adee14e647f99df8d5983ee48e29a59d8a30e1daf7fb1837e06