1
0

Accepting request 1149849 from shells

- Remove also patch
  bash-completion-fix-missing-directory-completion-with-filename-pattern.patch
  as the problem is fixed upstream 

- Update to version 2.12.0:
  Features
  * _comp_backup_glob: add ucf generated backup files (351be1c)
  * _comp_backup_glob: require dash in dpkg backup files (59a57f9)
  * comp_compgen{filedir,set}: define exit status (7920c9d)
  * _comp_compgen_commands: align return value with other compgens (9d3362e)
  * _comp_compgen_commands: auto set -o filenames when appropriate (4d4839e)
  * _comp_compgen_commands: include dirs (b9c7b5d)
  * _comp_compgen_known_hosts: return 2 on usage error (43bb8f0)
  * _comp_compgen: support -i cmd and -x cmd (39cc200)
  * _comp_compgen: support -U var to unlocal var (b603535)
  * _comp_compgen: support option -C (6b3dfa5)
  * _comp_expand_glob: fail when no paths are generated (6b0a466)
  * _comp_get_fist_arg: support "-o GLOB" to skip optargs (0f14cc0)
  * _ip_addresses: auto ltrim colon completions when appropriate (ccdf953)
  * add _comp_compgen_split (542bf73)
  * add _comp_locate_first_arg (0384bd5)
  * airflow: add fallback 3rd party completion loader (bf5550b)
  * ansible:* add fallback 3rd party completion loader (5f8384e)
  * apt-get: prefer apt-cache in same dir as command (a731bfd)
  * b2sum: new completion (cd985df)
  * bash_completion: add function _comp_compgen_ltrim_colon (ce5889b)
  * black,blackd: add fallback 3rd party completion loader (47a1f05)
  * carton: support exec command completions (0eb3a21)
  * chezmoi: add 3rd-party completion loader (cobra) (31baa69)
  * conda: add 3rd-party completion loader (argcomplete) (c0f5ba2)

OBS-URL: https://build.opensuse.org/request/show/1149849
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/bash-completion?expand=0&rev=58
This commit is contained in:
Ana Guerrero 2024-02-25 13:04:50 +00:00 committed by Git OBS Bridge
commit aadbfb5a37
21 changed files with 472 additions and 401 deletions

View File

@ -1,28 +1,28 @@
---
bash_completion | 47 ++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 46 insertions(+), 1 deletion(-)
bash-completion-2.12.0/bash_completion | 38 +++++++++++++++++++++++++++++++++
bash-completion-2.12.0/completions/cd | 11 ++++++++-
2 files changed, 48 insertions(+), 1 deletion(-)
Index: bash-completion-2.11/bash_completion
===================================================================
--- bash-completion-2.11.orig/bash_completion
+++ bash-completion-2.11/bash_completion
@@ -566,6 +566,7 @@ _filedir()
local IFS=$'\n'
_tilde "${cur-}" || return
+ _dollar "$cur" || return
--- bash-completion-2.12.0/bash_completion
+++ bash-completion-2.12.0/bash_completion 2024-02-23 07:34:25.733559088 +0000
@@ -1102,6 +1102,7 @@ _comp_quote_compgen()
_comp_compgen_filedir()
{
_comp_compgen_tilde && return
+ _comp_compgen_dollar "$cur" || return
local -a toks
local reset arg=${1-}
@@ -1044,6 +1045,42 @@ _tilde()
return $result
local _arg=${1-}
@@ -1775,6 +1776,43 @@ _comp_compgen_tilde()
return 1
}
+# Perform dollar ($) completion
+# Perform dollar ($ or backtick) completion
+# @return True (0) if completion needs further processing,
+# False (> 0) if dollar is followed by a valid username, completions
+# are put in COMPREPLY and no further processing is necessary.
+_dollar()
+# False (> 0) if dollar or backtick is for commands, also if dollar
+# is used for variables, completions are put in COMPREPLY and noq
+# further processing is necessary.
+_comp_compgen_dollar()
+{
+ local s=""
+ local -i glob=0
@ -54,24 +54,26 @@ Index: bash-completion-2.11/bash_completion
+ return ${#COMPREPLY[@]}
+}
+
# Expand variable starting with tilde (~)
# Expand string starting with tilde (~)
# We want to expand ~foo/... to /home/foo/... to avoid problems when
# word-to-complete starting with a tilde is fed to commands and ending up
@@ -1810,7 +1847,16 @@ complete -F _known_hosts traceroute trac
_cd()
--- bash-completion-2.12.0/completions/cd
+++ bash-completion-2.12.0/completions/cd 2024-02-23 07:45:00.565836867 +0000
@@ -5,7 +5,16 @@
_comp_cmd_cd()
{
local cur prev words cword
- _init_completion || return
+ _init_completion || {
local cur prev words cword comp_args
- _comp_initialize -- "$@" || return
+ _comp_initialize -- "$@" || {
+ if [[ ${#COMPREPLY[@]} -eq 1 ]]; then
+ local i=${COMPREPLY[0]}
+ if [[ "$i" == "$cur" && $i != "*/" ]]; then
+ _dollar "$i" || return
+ _comp_compgen_dollar "$i" || return
+ COMPREPLY[0]="${i%%/}/"
+ fi
+ fi
+ return
+ }
local IFS=$'\n' i j k
if [[ $cur == -* ]]; then
_comp_compgen_help -c help "$1"

View File

@ -24,69 +24,73 @@ Reviewed-by: Lidong Zhong <lzhong@suse.com>
Index: bash-completion-2.11/completions/lvm
===================================================================
--- bash-completion-2.11.orig/completions/lvm
+++ bash-completion-2.11/completions/lvm
@@ -6,27 +6,41 @@ _lvm_filedir()
_filedir
---
bash-completion-2.12.0/completions/lvm | 26 ++++++++++++++++++++------
1 file changed, 20 insertions(+), 6 deletions(-)
--- bash-completion-2.12.0/completions/lvm
+++ bash-completion-2.12.0/completions/lvm 2024-02-23 08:05:52.542682924 +0000
@@ -5,27 +5,41 @@ _comp_cmd_lvm__filedir()
_comp_compgen -c "${cur:-/dev/}" filedir
}
+_lvm_verbose()
+_comp_cmd_lvm__verbose()
+{
+ local silent=$(sed -n -e "s|^[ \t]*silent[ \t]*=[ \t]*\([01]\)|\1|p" /etc/lvm/lvm.conf)
+ test ${silent:-0} -eq 1
+}
+
_lvm_volumegroups()
_comp_cmd_lvm__volumegroups()
{
- COMPREPLY=($(compgen -W "$(vgscan 2>/dev/null |
- _comp_compgen_split -- "$(vgscan 2>/dev/null |
+ local verbose
+ _lvm_verbose && verbose=-v
+ COMPREPLY=( $(compgen -W "$( vgscan $verbose 2>/dev/null | \
command sed -n -e 's|.*Found.*"\(.*\)".*$|\1|p')" -- "$cur"))
+ _comp_cmd_lvm__verbose && verbose=-v
+ _comp_compgen_split -- "$(vgscan $verbose 2>/dev/null |
command sed -n -e 's|.*Found.*"\(.*\)".*$|\1|p')"
}
_lvm_physicalvolumes_all()
_comp_cmd_lvm__physicalvolumes_all()
{
- COMPREPLY=($(compgen -W "$(pvscan 2>/dev/null |
- _comp_compgen_split -- "$(pvscan 2>/dev/null |
+ local verbose
+ _lvm_verbose && verbose=-v
+ COMPREPLY=( $(compgen -W "$( pvscan $verbose 2>/dev/null | \
command sed -n -e 's|^.*PV \([^ ]*\) .*|\1|p')" -- "$cur"))
+ _comp_cmd_lvm__verbose && verbose=-v
+ _comp_compgen_split -- "$(pvscan $verbose 2>/dev/null |
command sed -n -e 's|^.*PV \([^ ]*\) .*|\1|p')"
}
_lvm_physicalvolumes()
_comp_cmd_lvm__physicalvolumes()
{
- COMPREPLY=($(compgen -W "$(pvscan 2>/dev/null |
- _comp_compgen_split -- "$(pvscan 2>/dev/null |
+ local verbose
+ _lvm_verbose && verbose=-v
+ COMPREPLY=( $(compgen -W "$( pvscan $verbose 2>/dev/null | \
command sed -n -e 's|^.*PV \(.*\) VG.*$|\1|p')" -- "$cur"))
+ _comp_cmd_lvm__verbose && verbose=-v
+ _comp_compgen_split -- "$(pvscan $verbose 2>/dev/null |
command sed -n -e 's|^.*PV \(.*\) VG.*$|\1|p')"
}
_lvm_logicalvolumes()
_comp_cmd_lvm__logicalvolumes()
{
- COMPREPLY=($(compgen -W "$(lvscan 2>/dev/null |
- _comp_compgen_split -- "$(lvscan 2>/dev/null |
+ local verbose
+ _lvm_verbose && verbose=-v
+ COMPREPLY=( $(compgen -W "$( lvscan $verbose 2>/dev/null | \
command sed -n -e "s|^.*'\(.*\)'.*$|\1|p")" -- "$cur"))
+ _comp_cmd_lvm__verbose && verbose=-v
+ _comp_compgen_split -- "$(lvscan $verbose 2>/dev/null |
command sed -n -e "s|^.*'\(.*\)'.*$|\1|p")"
if [[ $cur == /dev/mapper/* ]]; then
_filedir
@@ -387,7 +401,7 @@ _vgreduce()
if ((args == 0)); then
_lvm_volumegroups
_comp_compgen -a filedir
@@ -403,7 +417,7 @@ _comp_cmd_vgreduce()
if ((REPLY == 0)); then
_comp_cmd_lvm__volumegroups
else
- _lvm_physicalvolumes
+ _lvm_physicalvolumes_all
- _comp_cmd_lvm__physicalvolumes
+ _comp_cmd_lvm__physicalvolumes_all
fi
fi
} &&
@@ -701,7 +715,7 @@ _lvcreate()
if ((args == 0)); then
_lvm_volumegroups
@@ -735,7 +749,7 @@ _comp_cmd_lvcreate()
if ((REPLY == 0)); then
_comp_cmd_lvm__volumegroups
else
- _lvm_physicalvolumes
+ _lvm_physicalvolumes_all
- _comp_cmd_lvm__physicalvolumes
+ _comp_cmd_lvm__physicalvolumes_all
fi
fi
} &&

View File

@ -1,13 +1,11 @@
---
bash_completion | 15 ++++++++++-----
bash-completion-2.12.0/bash_completion | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
Index: bash-completion-2.11/bash_completion
===================================================================
--- bash-completion-2.11.orig/bash_completion
+++ bash-completion-2.11/bash_completion
@@ -1052,16 +1052,21 @@ _tilde()
_dollar()
--- bash-completion-2.12.0/bash_completion
+++ bash-completion-2.12.0/bash_completion 2024-02-23 07:56:27.581141856 +0000
@@ -1784,16 +1784,21 @@ _comp_compgen_tilde()
_comp_compgen_dollar()
{
local s=""
- local -i glob=0
@ -32,7 +30,7 @@ Index: bash-completion-2.11/bash_completion
\$\{*)
COMPREPLY=($(compgen -v -P '${' -S "}$s" -- ${1#??})) ;;
\$*)
@@ -1073,7 +1078,7 @@ _dollar()
@@ -1805,7 +1810,7 @@ _comp_compgen_dollar()
if ((${#COMPREPLY[@]} > 0)) ; then
((${#COMPREPLY[@]} == 1)) && eval COMPREPLY=\(${COMPREPLY[@]}\)

View File

@ -1,12 +1,10 @@
---
bash-completion-2.7/bash_completion | 20 ++++++++++++++------
bash-completion-2.12.0/bash_completion | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
Index: bash-completion-2.11/bash_completion
===================================================================
--- bash-completion-2.11.orig/bash_completion
+++ bash-completion-2.11/bash_completion
@@ -1059,13 +1059,21 @@ _dollar()
--- bash-completion-2.12.0/bash_completion
+++ bash-completion-2.12.0/bash_completion 2024-02-23 08:14:51.140697234 +0000
@@ -1791,13 +1791,21 @@ _comp_compgen_dollar()
[[ "$COMP_LINE" == cd* ]] && s="/"
case "$1" in
@ -32,7 +30,7 @@ Index: bash-completion-2.11/bash_completion
;;
\$\{*)
COMPREPLY=($(compgen -v -P '${' -S "}$s" -- ${1#??})) ;;
@@ -1078,8 +1086,8 @@ _dollar()
@@ -1810,8 +1818,8 @@ _comp_compgen_dollar()
if ((${#COMPREPLY[@]} > 0)) ; then
((${#COMPREPLY[@]} == 1)) && eval COMPREPLY=\(${COMPREPLY[@]}\)

BIN
bash-completion-2.11.tar.xz (Stored with Git LFS)

Binary file not shown.

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3eb05b1783c339ef59ed576afb0f678fa4ef49a6de8a696397df3148f8345af9
size 417272

View File

@ -1,27 +1,26 @@
---
bash_completion | 11 ++++++-----
bash-completion-2.12.0/bash_completion | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
Index: bash-completion-2.11/bash_completion
===================================================================
--- bash-completion-2.11.orig/bash_completion
+++ bash-completion-2.11/bash_completion
@@ -2031,12 +2031,13 @@ _longopt()
--- bash-completion-2.12.0/bash_completion
+++ bash-completion-2.12.0/bash_completion 2024-02-22 14:42:03.923479796 +0000
@@ -2989,13 +2989,14 @@ _comp_complete_longopt()
fi
}
# makeinfo and texi2dvi are defined elsewhere.
-complete -F _longopt a2ps awk base64 bash bc bison cat chroot colordiff cp \
-complete -F _comp_complete_longopt \
+complete -F _comp_complete_longopt -o filenames \
a2ps awk base64 bash bc bison cat chroot colordiff cp \
- csplit cut date df diff dir du enscript env expand fmt fold gperf \
+complete -F _longopt -o filenames a2ps awk base64 bash bc bison cat chroot colordiff cp \
+ csplit cut date df diff dir du enscript expand fmt fold gperf \
grep grub head irb ld ldd less ln ls m4 md5sum mkdir mkfifo mknod \
grep grub head irb ld ldd less ln ls m4 mkdir mkfifo mknod \
- mv netstat nl nm objcopy objdump od paste pr ptx readelf rm rmdir \
- sed seq sha{,1,224,256,384,512}sum shar sort split strip sum tac tail tee \
- sed seq shar sort split strip sum tac tail tee \
- texindex touch tr uname unexpand uniq units vdir wc who
+ mv nl nm objcopy objdump od paste pr ptx readelf rm rmdir \
+ sed sha{,1,224,256,384,512}sum shar sort split strip sum tac tail tee \
+ sed shar sort split strip sum tac tail tee \
+ texindex touch tr unexpand uniq vdir wc who
+complete -F _longopt -o default env netstat seq uname units
declare -Ag _xspecs
+complete -F _comp_complete_longopt -o default env netstat seq uname units
# @since 2.12
declare -Ag _comp_xspecs

View File

@ -1,28 +1,26 @@
Due legal issue the unRAR part of 7z had been removed (boo#1077978, boo#1090515)
---
completions/7z | 4 ++--
bash-completion-2.12.0/completions/7z | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: bash-completion-2.11/completions/7z
===================================================================
--- bash-completion-2.11.orig/completions/7z
+++ bash-completion-2.11/completions/7z
@@ -76,7 +76,7 @@ _7z()
--- bash-completion-2.12.0/completions/7z
+++ bash-completion-2.12.0/completions/7z 2024-02-23 08:20:37.142193535 +0000
@@ -66,7 +66,7 @@ _comp_cmd_7z()
else
COMPREPLY=($(compgen -P${cur:0:2} -W '7z apm arj bzip2 cab
chm cpio cramfs deb dmg elf fat flv gzip hfs iso lzh lzma
- lzma86 macho mbr mslz mub nsis ntfs pe ppmd rar rpm
+ lzma86 macho mbr mslz mub nsis ntfs pe ppmd rpm
squashfs swf swfc tar udf vhd wim xar xz z zip' \
-- "${cur:2}"))
_comp_compgen -c "${cur:2}" -- -P"${cur:0:2}" -W '7z apm arj
bzip2 cab chm cpio cramfs deb dmg elf fat flv gzip hfs iso
- lzh lzma lzma86 macho mbr mslz mub nsis ntfs pe ppmd rar
+ lzh lzma lzma86 macho mbr mslz mub nsis ntfs pe ppmd
rpm squashfs swf swfc tar udf vhd wim xar xz z zip'
fi
@@ -110,7 +110,7 @@ _7z()
return
@@ -98,7 +98,7 @@ _comp_cmd_7z()
# (assumption: extensions are all lowercase)
[[ $mode == w ]] &&
_filedir '@(7z|bz2|swf|?(g)tar|?(t)[bglx]z|tb?(z)2|wim)' ||
- _filedir '@(7z|arj|bz2|cab|chm|cpio|deb|dmg|flv|gem|img|iso|lz[ah]|lzma?(86)|msi|pmd|[rx]ar|rpm|sw[fm]|?(g)tar|taz|?(t)[bglx]z|tb?(z)2|vhd|wim|Z)'
+ _filedir '@(7z|arj|bz2|cab|chm|cpio|deb|dmg|flv|gem|img|iso|lz[ah]|lzma?(86)|msi|pmd|xar|rpm|sw[fm]|?(g)tar|taz|?(t)[bglx]z|tb?(z)2|vhd|wim|Z)'
_comp_compgen -a filedir '@(7z|bz2|swf|?(g)tar|?(t)[bglx]z|tb?(z)2|wim)' ||
- _comp_compgen -a filedir '@(7z?(.001)|arj|bz2|cab|cb7|chm|cpio|deb|dmg|flv|gem|img|iso|lz[ah]|lzma?(86)|msi|pmd|[rx]ar|rpm|sw[fm]|?(g)tar|taz|?(t)[bglx]z|tb?(z)2|vhd|wim|Z)'
+ _comp_compgen -a filedir '@(7z?(.001)|arj|bz2|cab|cb7|chm|cpio|deb|dmg|flv|gem|img|iso|lz[ah]|lzma?(86)|msi|pmd|xar|rpm|sw[fm]|?(g)tar|taz|?(t)[bglx]z|tb?(z)2|vhd|wim|Z)'
else
if [[ ${words[1]} == d ]]; then
local IFS=$'\n'
_comp_compgen_split -l -- "$(

View File

@ -1,73 +0,0 @@
From 06f94a5c855fc38c0583a3b65c27c1c814a90bac Mon Sep 17 00:00:00 2001
From: Michal Suchanek <msuchanek@suse.de>
Date: Mon, 30 Mar 2020 19:48:39 +0200
Subject: [PATCH] Revert "_filedir: avoid duplicate dirs internally, and a
compgen -d call for files"
This reverts commit da99bc55954e9f60b9c3a9e9071ff6301d7015cb.
References: https://github.com/scop/bash-completion/issues/378 boo#1167952
The solution without calling compgen -d proves unrealiable.
Until this is fixed revert to calling compgen -d for completions with
file pattern.
---
bash_completion | 25 ++++++++-----------------
1 file changed, 8 insertions(+), 17 deletions(-)
Index: bash-completion-2.11/bash_completion
===================================================================
--- bash-completion-2.11.orig/bash_completion
+++ bash-completion-2.11/bash_completion
@@ -571,34 +571,22 @@ _filedir()
local -a toks
local reset arg=${1-}
- if [[ $arg == -d ]]; then
- reset=$(shopt -po noglob)
- set -o noglob
- toks=($(compgen -d -- "${cur-}"))
- IFS=' '
- $reset
- IFS=$'\n'
- else
+ reset=$(shopt -po noglob); set -o noglob
+ toks=( $(compgen -d -- "$cur") )
+ IFS=' '; $reset; IFS=$'\n'
+
+ if [[ "$1" != -d ]]; then
local quoted
_quote_readline_by_ref "${cur-}" quoted
# Munge xspec to contain uppercase version too
# https://lists.gnu.org/archive/html/bug-bash/2010-09/msg00036.html
# news://news.gmane.io/4C940E1C.1010304@case.edu
- local xspec=${arg:+"!*.@($arg|${arg^^})"} plusdirs=()
-
- # Use plusdirs to get dir completions if we have a xspec; if we don't,
- # there's no need, dirs come along with other completions. Don't use
- # plusdirs quite yet if fallback is in use though, in order to not ruin
- # the fallback condition with the "plus" dirs.
- local opts=(-f -X "$xspec")
- [[ $xspec ]] && plusdirs=(-o plusdirs)
- [[ ${COMP_FILEDIR_FALLBACK-} || -z ${plusdirs-} ]] ||
- opts+=("${plusdirs[@]}")
+ local xspec=${1:+"!*.@($1|${1^^})"}
reset=$(shopt -po noglob)
set -o noglob
- toks+=($(compgen "${opts[@]}" -- $quoted))
+ toks+=( $(compgen -f -X "$xspec" -- $quoted) )
IFS=' '
$reset
IFS=$'\n'
@@ -607,7 +595,7 @@ _filedir()
[[ -n ${COMP_FILEDIR_FALLBACK-} && -n $arg && ${#toks[@]} -lt 1 ]] && {
reset=$(shopt -po noglob)
set -o noglob
- toks+=($(compgen -f ${plusdirs+"${plusdirs[@]}"} -- $quoted))
+ toks+=( $(compgen -f -- $quoted) )
IFS=' '
$reset
IFS=$'\n'

View File

@ -1 +1 @@
addFilter("bash-completion.noarch: E: devel-file-in-non-devel-package .* /usr/share/pkgconfig/bash-completion.pc")
addFilter("E:.*filelist-forbidden-bashcomp-userdirs.*/etc/bash_completion.d/000_bash_completion_compat.bash")

View File

@ -1,3 +1,255 @@
-------------------------------------------------------------------
Fri Feb 23 09:56:03 UTC 2024 - Dr. Werner Fink <werner@suse.de>
- Remove also patch
bash-completion-fix-missing-directory-completion-with-filename-pattern.patch
as the problem is fixed upstream
-------------------------------------------------------------------
Fri Feb 23 09:04:25 UTC 2024 - Dr. Werner Fink <werner@suse.de>
- Update to version 2.12.0:
Features
* _comp_backup_glob: add ucf generated backup files (351be1c)
* _comp_backup_glob: require dash in dpkg backup files (59a57f9)
* comp_compgen{filedir,set}: define exit status (7920c9d)
* _comp_compgen_commands: align return value with other compgens (9d3362e)
* _comp_compgen_commands: auto set -o filenames when appropriate (4d4839e)
* _comp_compgen_commands: include dirs (b9c7b5d)
* _comp_compgen_known_hosts: return 2 on usage error (43bb8f0)
* _comp_compgen: support -i cmd and -x cmd (39cc200)
* _comp_compgen: support -U var to unlocal var (b603535)
* _comp_compgen: support option -C (6b3dfa5)
* _comp_expand_glob: fail when no paths are generated (6b0a466)
* _comp_get_fist_arg: support "-o GLOB" to skip optargs (0f14cc0)
* _ip_addresses: auto ltrim colon completions when appropriate (ccdf953)
* add _comp_compgen_split (542bf73)
* add _comp_locate_first_arg (0384bd5)
* airflow: add fallback 3rd party completion loader (bf5550b)
* ansible:* add fallback 3rd party completion loader (5f8384e)
* apt-get: prefer apt-cache in same dir as command (a731bfd)
* b2sum: new completion (cd985df)
* bash_completion: add function _comp_compgen_ltrim_colon (ce5889b)
* black,blackd: add fallback 3rd party completion loader (47a1f05)
* carton: support exec command completions (0eb3a21)
* chezmoi: add 3rd-party completion loader (cobra) (31baa69)
* conda: add 3rd-party completion loader (argcomplete) (c0f5ba2)
* crc: add 3rd-party completion loader (cobra) (f10866e)
* cz: add fallback 3rd party completion loader (b7ba70e)
* dot: support filename extension .gv (be0010e)
* dprint: add fallback 3rd party completion loader (e201e0e)
* eog: add missing extension .heif (9e4a48f)
* eog: associate with *.avif and *.webp (#1005) (f1c04b8)
* eog: associate with *.heic and *.jxl (20c9cea)
* eog: associate with *.pbm (#1006) (5472cc1)
* feh: associate with y4m and heic/heif/avif (e252c73)
* feh: deassociate with avci/avcs (af46f34)
* flask: add fallback 3rd party completion loader (3e0d00d)
* hash: new completion (#1013) (4d0bffb)
* httpx: add fallback 3rd party completion loader (3f4861c)
* ip: Add completion for monitor subcommand (fa696e6)
* jungle: add fallback 3rd-party completion loader (c69845a)
* keyring: add fallback 3rd party completion loader (8082602)
* kontena: add fallback 3rd-party completion loader (5eef0ce)
* lefthook: add fallback 3rd party completion loader (dc9650e)
* mailman: prefer list_lists in same dir as command (a46ccf1)
* mysql: prefer mysqlshow from same dir (643886c)
* no empty command completion if no_empty_cmd_completion is on (faab292)
* npm: add fallback 3rd-party completion loader (f1c085c)
* nvm: add fallback 3rd-party completion loader (dea7e1d)
* oc: add 3rd-party completion loader (cobra) (26b5f09)
* pip{,3}: add fallback 3rd-party completion loader (e3cbfba)
* pipenv: add fallback 3rd party completion loader (#1020) (6ecf5bd)
* pytest: complete new --import-mode value (#1021) (2d636a3)
* rtx: add fallback 3rd party completion loader (0628e22)
* scp,sftp: prefer ssh from same dir to resolve options etc (d55f5e6)
* ssh-copy-id,ssh-keygen: prefer ssh from same dir (5c1d270)
* ssh-inscribe: add fallback 3rd party completion loader (7f2c197)
* ssh: complete RequiredRSASize (#1064) (de15205)
* tkn-pac: add 3rd-party completion loader (cobra) (d0f2604)
* tkn: add 3rd-party completion loader (cobra) (161fc5d)
* xrandr: comma separated --setmonitor third argument (8a76f3d)
Bug Fixes
* __load_completion: quoted compspec for variants (#1008) (0a2443e)
* _cd_devices: /dev/cdc-* CDC device false positives (5250728)
* _comp__init_set_up_service_completions: work around failglob (2529d40)
* comp{first_arg,count_args}: count - as argument (e23a79e)
* comp{first_arg,count_args}: count any arguments after -- (9bfd760)
* _comp_command_offset: Support complete -C (80450ca)
* _comp_compgen_fstypes: avoid unexpected expansions (a856d81)
* _comp_compgen_help: allow dots to connect names in longopt (79dadfc)
* _comp_compgen_known_hosts: work around bash-4.2 nounset (d2860cb)
* _comp_compgen_split: work around nounset (f488f96)
* _comp_compgen_term: replace completions by default (d3696a3)
* _comp_compgen_usergroup: avoid directly overwriting COMPREPLY (d380498)
* _comp_compgen: do not inherit -a for explicitly specified var (3c20766)
* _comp_compgen: explicitly exclude cur from the target variable (5fe98f3)
* _comp_count_args: check optarg correctly (874c503)
* _comp_count_args: exclude <>& from wordbreaks as _comp_initialize (521d2bb)
* _comp_count_args: ignore empty $3 (76eea74)
* _comp_count_args: perform optarg check also on $3 (21d3122)
* _comp_count_args: skip reassembling cword and words (3127703)
* _comp_delimited: treat delimiter as a fixed string (571a0f7)
* _comp_deprecate_func: argument order in usage error message (597f62f)
* _comp_get_words: empty prev if unavailable (localvar_inherit) (d8b8eef)
* _comp_initialize: fix completions of redirections without space (da16bf6)
* _comp_initialize: protect against "localvar_inherit" (0cc8d83)
* _comp_split,_comp_compgen: strip periods from error message (b3b6a7c)
* _comp_split: update error message for the correct options (3c4a89c)
* _comp_sysvdirs: work around nounset (da26178)
* _filedir_xspec: clean up unused variable tmp (67f1189)
* _get_cword_at_cursor,cvs: quote array length (201239c)
* _get_first_arg: remove invalid doccomment (eb40f56)
* _known_hosts: use array for options (work around SC2178,SC2179) (743d0a9)
* _mock,rpm: avoid icase flag s/reg/rep/i of GNU sed (33c18ce)
* _service: quote word (c2d7fb7)
* _slackpkg: do not scan after cword (ecd1384)
* 7z: remove redundant printf '%s\n' "..." (20c2e32)
* ant: work around custom IFS (584e567)
* apt-cache: check all the words (84cfeda)
* aptitude: do not use non-POSIX BRE \w (cd8c870)
* aspell: use _comp_expand_glob against unexpected splitting (58d5176)
* bash_completion: remove some unnecessary -a to _comp_compgen (636bb7c)
* bts: update functions to generators and fix variable conflicts (7d2867c)
* carton: remove a branch never happening (cd063f9)
* chgrp: fix typo _comp_compgen{d =&gt; _}filedir (#1063) (4c98ce5)
* compat: find compat dir for prefix-install (b6d06bc)
* completions/*: quote array assignments properly (848aa41)
* completions/*: scan until cword instead of ${#words[@]}-1 (17e0cc3)
* completions/*: work around localvar_inherit (e3a871d)
* curl,koji: use _comp_compgen_help (f37f221)
* curl,qemu: avoid using POSIX character classes for mawk (d60c530)
* curl: colon handling for IPv6 address completions (8508d1d)
* cvs,mutt,pkg_delete: quote prefix to remove for literal matching (533903e)
* cvs: avoid variable conflicts (0d145c9)
* dict: nounset error when host/port not set (57191e2)
* dict: protect splitting from custom IFS (b31fe1e)
* dict: work around bash-4.2 array nounset (d76dd9e)
* dict: work around bash-4.3 ${v+"$@"} with custom IFS
Unable to render expression.
* ${v+"$@"} with custom IFS (cc21298)
* dmypy: protect against "localvar_inherit" (768ce65)
* dpkg-source: filter completions by cur (dbcef6e)
* filedir: work around bash-4.2 compgen -f -- "''" (c8bb123)
* fix problems with set -o nounset (9c3e196)
* gdb: fix regression that fails to generate command names (ca8e240)
* gdb: remove duplicate candidates (532fc05)
* gdb: use POSIX-compatible find expression (73938cd)
* gdb: work around bash 4.4 ${v+"$@"}
* get_words: work around bash-4.3 connected ${v+"$@"}
* getent: check noargopts (6143f25)
* getent: work around localvar_inherit (a12f438)
* gzip,isort: fix typo _comp_com{gp =&gt; pg}en (462feb3)
* iperf,puppet: use {m,n} instead of ? and + for POSIX sed (3f0322b)
* iperf: work around failglob with backslash in bash-5.0 (979f04f)
* ip: Remove non-existent route completion (3b9ce4d)
* isql: work around nounset (cb7007a)
* java,kldload: use _comp_compgen for filename-based mod names (81adc6c)
* java: localize cur (ec0068d)
* kcov,povray: quote array expansions to avoid extra processing (215edab)
* kldload,mplayer,mutt: work around nounset (5330fbe)
* kldunload: remove unused -X option (35017d2)
* known_hosts_real: match *.pub instead of *pub (470a644)
* known_hosts_real: use _comp_expand_glob to avoid failglob (672215e)
* known_hosts_real: work around nounset (07c619a)
* lilo,rpcdebug,slapt-{get,src}: work around nounset (cfc3eda)
* lvm: replace array slices with existing utility (ea49840)
* lvm: update call to sub-command (30494f7)
* make: handle multiple short options in skipping arguments (24c80c9)
* make: typo fix in a code comment (e72cc82)
* mdadm,update-alternatives: fix leak variable (14cd53b)
* medusa: filter completions by the current word cur (f3ae706)
* mr: avoid ${var/pat/$'...'} for compat42 in bash >= 4.3 (b5ae5fa)
* mr: exactly match command names (800b103)
* mutt: avoid unexpected word splitting (3183e67)
* mutt: fix use of regex in the glob context (63924e6)
* mutt: rewrite ${cur/#!/X} to X${cur:1} against patsub_replacement (6b8f82b)
* mutt: use _comp_dequote for safe eval (f98379d)
* openssl: avoid variable conflicts (a31906c)
* openssl: fix variable i leak (83844b7)
* perl: fix ineffective condition in an awk script (302dc52)
* perl: helper call regression from 01611dd (b85263a)
* pgrep: do not rely on uncontrolled IFS (99e38b2)
* portinstall: use awk and _comp_compgen to filter completions (791f56c)
* povray,sbopkg: check filetype (434eb08)
* povray: process each element against patsub_replacement (0afc2e4)
* povray: quote an argument properly (0a240bd)
* ps,ss: avoid extra expansions by -W "$(...)" in _comp_delimited (cb347cb)
* pydoc: specify -a to _comp_compgen_filedir (34a91e9)
* pytest: do not filter underscores from parsed option arg choices (ea13241)
* python: avoid variable conflicts (bef94c3)
* python: complete filenames for script arguments (#1018) (397a49d)
* python: complete micropython and pyston script args consistently (5b60ccc)
* qdbus: remove cur and all the rest arguments (531b751)
* replace \s with [[:space:]] for POSIX sed/awk (1989ba9)
* ri: avoid interference on existing COMPREPLY (0a9d931)
* ri: fix wrongly quoted options to compgen (5248bbf)
* ri: properly split methods (910a5a0)
* ri: split classes using _comp_split (c95baa1)
* ri: work around localvar_inherit (9d6ff68)
* sbopkg: add ; mandatory before } in POSIX sed (b286d53)
* sbopkg: work around nounset (9709bdf)
* scp: nounset mode error on unknown suboption, bash 4.2 (82ca8d9)
* ssh-copy-id: call ssh, not -copy-id for suboption completion check (473278f)
* ssh-keygen: call ssh, not -keygen to resolve supported protocols (d569ea2)
* ssh-keygen: first arg to ssh query for protocol versions (8a0a71e)
* ssh: avoid variable conflicts (f2df91d)
* ssh: fix wrong quoting inside compgen -W (febb3b3)
* ssh: remove -a of generators (55c5c45)
* ssh: remove unnecessary -a to _comp_compgen (992f28e)
* ssh: resolve relative ssh_config Include correctly (4ac86e8)
* ssh: use _comp_compgen for _comp_xfunc_ssh_identityfile (05e70ed)
* ssh: work around bash-4.2 nounset (4447f83)
* ssh: work around bash-4.2 nounset (d0695d0)
* sudo: use $1 (sudo) as $root_command (329ca0e)
* svcadm: fix ineffective IFS for splitting (1fd456e)
* svcadm: use the first matching name as command (1870d5e)
* sysbench: fix extraction of test-name option (cc246a1)
* timeout: always treat word after duration as command (0d0531b)
* tipc: remove filtered-out elements (75b36b2)
* update-alternatives: quote dirname (1205ed1)
* update-alternatives: suppress error for non-existent directory (adbdab8)
* update-alternatives: work around localvar_inherit (1d9e19c)
* upgradepkg: use _comp_compgen for _comp_cmd_upgradepkg (a0973d7)
* use _comp_compgen_split to avoid extra expansions by -W "$(...)" (49997d0)
* use _comp_compgen_split to split and filter words (158b8ba)
* use _comp_compgen_split while keeping filtering by $cur (a00ee19)
* use _comp_compgen for word list (83f033f)
* use _comp_split while keeping filtering by $cur (509e642)
* use compgen -P prefix -W '"${arr[@]}"' against patsub_replacement (45d036a)
* use XPG4 awk in Solaris (cdd6da9)
* wol: filter IP addresses by cur (c3505c5)
* wtf: quote array assignment (44c1d12)
* xfreerdp: support the new form of the option /list:kbd (d8cadfe)
* xfunc ssh identityfile: localize change to cur (76b5726)
Performance Improvements
* _comp_count_args: skip reinitializing cword and words (29398ef)
* mutt: return earlier on empty cur (a244587)
* portinstall: return earlier for -lLo and non-existent file (395e463)
* vncviewer: set nocasematch inside subshell (5ed0020)
- Delete patches as fixed upstream
* fix-curl-help-completion-bsc1200791.patch
* fix_quote_readline_by_ref.patch
- Port patches
* FOO-dir-completion-boo905348.patch
* LVM-completion-bsc946875.patch
* backtick-completion-boo940835.patch
* backticks-bsc963140.patch
* bash-completion-2.4.patch
* bash-completion-2.7-unRAR-remove.patch
* bash-completion.changes
* bash-completion.spec
* boo1190929-9af4afd0.patch
* bsc1199724-modules.patch
* ls-completion-boo889319.patch
* qdbus-qt5.patch
* respect-variables-boo940837.patch
* rm-completion-smart-boo958462.patch
* tar-completion.patch
- Do not apply patch
bash-completion-fix-missing-directory-completion-with-filename-pattern.patch
as not known how to port and if this is required
-------------------------------------------------------------------
Thu Aug 17 12:28:28 UTC 2023 - Dr. Werner Fink <werner@suse.de>

View File

@ -1,7 +1,7 @@
#
# spec file
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -29,7 +29,7 @@
%global _name bash-completion
Name: %{_name}%{?nsuffix}
Version: 2.11
Version: 2.12.0
Release: 0
%if %{build_core}
Summary: Programmable Completion for Bash
@ -64,21 +64,15 @@ Patch9: rm-completion-smart-boo958462.patch
Patch10: backticks-bsc963140.patch
# PATCH-FIX-SUSE boo#1090515
Patch11: bash-completion-2.7-unRAR-remove.patch
# PATCH-FIX-SUSE boo#1167952
Patch12: bash-completion-fix-missing-directory-completion-with-filename-pattern.patch
# PATCH-FIX-SUSE boo#1190929
Patch13: boo1190929-9af4afd0.patch
# PATCH-FIX-SUSE boo#1199724
Patch14: bsc1199724-modules.patch
# PATCH-FIX-UPSTREAM bsc#1200791
Patch15: fix-curl-help-completion-bsc1200791.patch
# PATCH-FIX-SUSE -- avoid broken quotes ands escapes
Patch16: fix_quote_readline_by_ref.patch
BuildRequires: libtool
BuildRequires: pkgconfig
BuildArch: noarch
%if %{build_doc}
BuildRequires: asciidoc
BuildRequires: cmark
BuildRequires: libxslt-tools
%endif
%if %{build_core}
@ -114,7 +108,10 @@ autoreconf -fiv
%if %{build_doc}
pushd doc
mkdir html
a2x -D html -d book -f xhtml --asciidoc-opts="--unsafe" main.txt
for md in *.md
do
cmark $md --to html > html/${md%%.md}.html
done
popd
%endif
@ -161,6 +158,8 @@ install -m 0644 README.md %{buildroot}%{_defaultdocdir}/%{_name}/README
%{_defaultdocdir}/%{_name}/html/
%else
%license COPYING
%dir %{_sysconfdir}/bash_completion.d/
%{_sysconfdir}/bash_completion.d/000_bash_completion_compat.bash
%{_datadir}/bash-completion
%config %{_sysconfdir}/profile.d/bash_completion.sh

View File

@ -1,50 +1,4 @@
From 9af4afd01facc0dc3407c8b81375bedd4b2f5fa4 Mon Sep 17 00:00:00 2001
From: Michal Suchanek <msuchanek@suse.de>
Date: Thu, 30 Sep 2021 12:25:49 +0200
Subject: [PATCH] insmod, modinfo, modprobe: support zstd compressed modules
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
---
completions/insmod | 2 +-
completions/modinfo | 2 +-
completions/modprobe | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
--- a/completions/insmod
+++ b/completions/insmod 2021-10-04 13:34:04.749347460 +0000
@@ -7,7 +7,7 @@ _insmod()
# do filename completion for first argument
if ((cword == 1)); then
- _filedir '@(?(k)o?(.[gx]z))'
+ _filedir '@(?(k)o?(.[gx]z|.zst))'
else # do module parameter completion
COMPREPLY=($(compgen -W "$(PATH="$PATH:/sbin" modinfo \
-p ${words[1]} 2>/dev/null | cut -d: -f1)" -- "$cur"))
--- a/completions/modinfo
+++ b/completions/modinfo 2021-10-04 13:34:04.749347460 +0000
@@ -37,7 +37,7 @@ _modinfo()
# do filename completion if we're giving a path to a module
if [[ $cur == @(*/|[.~])* ]]; then
- _filedir '@(?(k)o?(.[gx]z))'
+ _filedir '@(?(k)o?(.[gx]z|.zst))'
else
_modules $version
fi
--- a/completions/modprobe
+++ b/completions/modprobe 2021-10-04 13:34:04.749347460 +0000
@@ -80,7 +80,7 @@ _modprobe()
insert)
# do filename completion if we're giving a path to a module
if [[ $cur == @(*/|[.~])* ]]; then
- _filedir '@(?(k)o?(.[gx]z))'
+ _filedir '@(?(k)o?(.[gx]z|.zst))'
elif [[ -n $module ]]; then
# do module parameter completion
if [[ $cur == *=* ]]; then
================================================================================
From: Werner Fink <werenr@suse.de>
From: Werner Fink <werner@suse.de>
Date: Mon, 04 Oct 2021 15:38:08 +0200
Subject: Also support .bz2 compressed kernel modules
@ -54,36 +8,39 @@ Subject: Also support .bz2 compressed kernel modules
completions/modprobe | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/completions/insmod b/completions/insmod
--- a/completions/insmod
+++ b/completions/insmod 2021-10-04 13:35:49.279524797 +0000
@@ -7,7 +7,7 @@ _insmod()
+++ b/completions/insmod
@@ -7,7 +7,7 @@ _comp_cmd_insmod()
# do filename completion for first argument
if ((cword == 1)); then
- _filedir '@(?(k)o?(.[gx]z|.zst))'
+ _filedir '@(?(k)o?(.[gx]z|.zst|.bz2))'
- _comp_compgen_filedir '@(?(k)o?(.[gx]z|.zst))'
+ _comp_compgen_filedir '@(?(k)o?(.[gx]z|.zst|.bz2))'
else # do module parameter completion
COMPREPLY=($(compgen -W "$(PATH="$PATH:/sbin" modinfo \
-p ${words[1]} 2>/dev/null | cut -d: -f1)" -- "$cur"))
_comp_compgen_split -- "$(PATH="$PATH:/sbin" modinfo \
-p "${words[1]}" 2>/dev/null | cut -d: -f1)"
diff --git a/completions/modinfo b/completions/modinfo
--- a/completions/modinfo
+++ b/completions/modinfo 2021-10-04 13:35:59.863340257 +0000
@@ -37,7 +37,7 @@ _modinfo()
+++ b/completions/modinfo
@@ -43,7 +43,7 @@ _comp_cmd_modinfo()
# do filename completion if we're giving a path to a module
if [[ $cur == @(*/|[.~])* ]]; then
- _filedir '@(?(k)o?(.[gx]z|.zst))'
+ _filedir '@(?(k)o?(.[gx]z|.zst|.bz2))'
- _comp_compgen_filedir '@(?(k)o?(.[gx]z|.zst))'
+ _comp_compgen_filedir '@(?(k)o?(.[gx]z|.zst|.bz2))'
else
_modules $version
_comp_compgen_kernel_modules "$version"
fi
diff --git a/completions/modprobe b/completions/modprobe
--- a/completions/modprobe
+++ b/completions/modprobe 2021-10-04 13:36:14.743080796 +0000
@@ -80,7 +80,7 @@ _modprobe()
+++ b/completions/modprobe
@@ -83,7 +83,7 @@ _comp_cmd_modprobe()
insert)
# do filename completion if we're giving a path to a module
if [[ $cur == @(*/|[.~])* ]]; then
- _filedir '@(?(k)o?(.[gx]z|.zst))'
+ _filedir '@(?(k)o?(.[gx]z|.zst|.bz2))'
elif [[ -n $module ]]; then
- _comp_compgen_filedir '@(?(k)o?(.[gx]z|.zst))'
+ _comp_compgen_filedir '@(?(k)o?(.[gx]z|.zst|.bz2))'
elif [[ $module ]]; then
# do module parameter completion
if [[ $cur == *=* ]]; then

View File

@ -2,14 +2,15 @@
bash_completion | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bash_completion b/bash_completion
--- a/bash_completion
+++ b/bash_completion 2022-05-23 10:50:43.197937832 +0000
@@ -1316,7 +1316,7 @@ _modules()
local modpath
modpath=/lib/modules/$1
COMPREPLY=($(compgen -W "$(command ls -RL $modpath 2>/dev/null |
- command sed -ne 's/^\(.*\)\.k\{0,1\}o\(\.[gx]z\)\{0,1\}$/\1/p')" -- "$cur"))
+ command sed -ne 's/^\(.*\)\.k\{0,1\}o\(\.[gx]z\|\.bz2\|\.zst\)\{0,1\}$/\1/p')" -- "$cur"))
+++ b/bash_completion
@@ -2090,7 +2090,7 @@ _comp_compgen_kernel_modules()
local _modpath=/lib/modules/$1
_comp_compgen_split -- "$(command ls -RL "$_modpath" 2>/dev/null |
command sed -ne 's/^\(.*\)\.k\{0,1\}o\(\.[gx]z\)\{0,1\}$/\1/p' \
- -e 's/^\(.*\)\.ko\.zst$/\1/p')"
+ -e 's/^\(.*\)\.ko\.zst$/\1/p' -e 's/^\(.*\)\.ko\.bz2$/\1/p')"
}
# This function completes on installed modules
# This function completes on inserted kernel modules

View File

@ -1,17 +0,0 @@
---
completions/curl | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/completions/curl
+++ b/completions/curl
@@ -91,7 +91,9 @@ _curl()
esac
if [[ $cur == -* ]]; then
- COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
+ COMPREPLY=($(compgen -W '$(_parse_help "$1" "--help all")' -- "$cur"))
+ [[ $COMPREPLY ]] ||
+ COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
fi
} &&
complete -F _curl curl

View File

@ -1,43 +0,0 @@
From: JuanJo Ciarlante <jjo@canonical.com>
Subject: fix _quote_readline_by_ref to:
- avoid escaping 1st '~' (lp: #1288314)
- avoid quoting if empty, else expansion without args only shows dirs
(lp: #1288031)
- replace double escaping to single (eg for completing file/paths with
spaces)
Origin: vendor, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=739835
Bug-Debian: https://bugs.debian.org/739835
Forwarded: yes, <5328F418.100@canonical.com>
---
bash_completion | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
--- a/bash_completion
+++ b/bash_completion 2023-08-17 12:16:26.654187550 +0000
@@ -542,13 +542,24 @@ __ltrim_colon_completions()
# @param $2 Name of variable to return result to
_quote_readline_by_ref()
{
- if [[ $1 == \'* ]]; then
+ if [ -z "$1" ]; then
+ # avoid quoting if empty
+ printf -v $2 %s "$1"
+ elif [[ $1 == \'* ]]; then
# Leave out first character
printf -v $2 %s "${1:1}"
+ elif [[ $1 == ~* ]]; then
+ # avoid escaping first ~
+ printf -v $2 ~%q "${1:1}"
else
printf -v $2 %q "$1"
fi
+ # Replace double escaping ( \\ ) by single ( \ )
+ # This happens always when argument is already escaped at cmdline,
+ # and passed to this function as e.g.: file\ with\ spaces
+ [[ ${!2} == *\\* ]] && printf -v $2 %s "${1//\\\\/\\}"
+
# If result becomes quoted like this: $'string', re-evaluate in order to
# drop the additional quoting. See also:
# https://www.mail-archive.com/bash-completion-devel@lists.alioth.debian.org/msg01942.html

View File

@ -1,22 +1,20 @@
---
bash_completion | 3 ++-
bash-completion-2.12.0/bash_completion | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: bash-completion-2.11/bash_completion
===================================================================
--- bash-completion-2.11.orig/bash_completion
+++ bash-completion-2.11/bash_completion
@@ -2079,11 +2079,12 @@ _longopt()
# makeinfo and texi2dvi are defined elsewhere.
complete -F _longopt -o filenames a2ps awk base64 bash bc bison cat chroot colordiff cp \
--- bash-completion-2.12.0/bash_completion
+++ bash-completion-2.12.0/bash_completion 2024-02-23 07:54:39.219148113 +0000
@@ -3030,11 +3030,12 @@ _comp_complete_longopt()
complete -F _comp_complete_longopt -o filenames \
a2ps awk base64 bash bc bison cat chroot colordiff cp \
csplit cut date df diff dir du enscript expand fmt fold gperf \
- grep grub head irb ld ldd less ln ls m4 md5sum mkdir mkfifo mknod \
+ grep grub head irb ld ldd less ln m4 md5sum mkdir mkfifo mknod \
- grep grub head irb ld ldd less ln ls m4 mkdir mkfifo mknod \
+ grep grub head irb ld ldd less ln m4 mkdir mkfifo mknod \
mv nl nm objcopy objdump od paste pr ptx readelf rm rmdir \
sed sha{,1,224,256,384,512}sum shar sort split strip sum tac tail tee \
sed shar sort split strip sum tac tail tee \
texindex touch tr unexpand uniq vdir wc who
complete -F _longopt -o default env netstat seq uname units
+complete -F _longopt -o bashdefault -o default -o filenames ls ll la l ls-l lf
declare -Ag _xspecs
complete -F _comp_complete_longopt -o default env netstat seq uname units
+complete -F _comp_complete_longopt -o bashdefault -o default -o filenames ls ll la l ls-l lf
# @since 2.12
declare -Ag _comp_xspecs

View File

@ -5,34 +5,38 @@ qdbus is the Qt 4 variant, also complete for the Qt 5 version.
Index: bash-completion-2.11/completions/qdbus
===================================================================
--- bash-completion-2.11.orig/completions/qdbus
+++ bash-completion-2.11/completions/qdbus
@@ -9,6 +9,6 @@ _qdbus()
COMPREPLY=($(compgen -W '$(command ${words[@]} 2>/dev/null | \
command sed "s/(.*)//")' -- "$cur"))
} &&
- complete -F _qdbus qdbus dcop
+ complete -F _qdbus qdbus qdbus-qt5 dcop
# ex: filetype=sh
Index: bash-completion-2.11/completions/Makefile.am
===================================================================
--- bash-completion-2.11.orig/completions/Makefile.am
+++ bash-completion-2.11/completions/Makefile.am
@@ -680,6 +680,7 @@ CLEANFILES = \
pyvenv-3.6 \
pyvenv-3.7 \
pyvenv-3.8 \
+ qdbus-qt5 \
---
bash-completion-2.12.0/completions/Makefile.am | 4 +++-
bash-completion-2.12.0/completions/qdbus | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
--- bash-completion-2.12.0/completions/Makefile.am
+++ bash-completion-2.12.0/completions/Makefile.am 2024-02-23 09:21:49.726811653 +0000
@@ -821,6 +821,8 @@ CLEANFILES = \
pyvenv-3.10 \
pyvenv-3.11 \
pyvenv-3.12 \
+ qdbus-qt5 \
+ qdbus6 \
qemu-kvm \
qemu-system-i386 \
qemu-system-x86_64 \
@@ -894,7 +895,7 @@ symlinks: $(DATA)
$(ss) pyvenv \
pyvenv-3.4 pyvenv-3.5 pyvenv-3.6 pyvenv-3.7 pyvenv-3.8
@@ -1169,7 +1171,7 @@ symlinks: $(DATA)
pyvenv-3.4 pyvenv-3.5 pyvenv-3.6 pyvenv-3.7 pyvenv-3.8 \
pyvenv-3.9 pyvenv-3.10 pyvenv-3.11 pyvenv-3.12
$(ss) qdbus \
- dcop
+ dcop qdbus-qt5
+ dcop qdbus-qt5 qdbus6
$(ss) qemu \
qemu-kvm qemu-system-i386 qemu-system-x86_64
$(ss) quota \
--- bash-completion-2.12.0/completions/qdbus
+++ bash-completion-2.12.0/completions/qdbus 2024-02-23 09:20:07.148708732 +0000
@@ -9,6 +9,6 @@ _comp_cmd_qdbus()
command "${words[@]::cword}" 2>/dev/null | command sed 's/(.*)//'
)"
} &&
- complete -F _comp_cmd_qdbus qdbus dcop
+ complete -F _comp_cmd_qdbus qdbus qdbus-qt5 qdbus6 dcop
# ex: filetype=sh

View File

@ -5,21 +5,19 @@ That is do not escape the dollar character of a variable to allow
commands like `ls' to go further in its completion chain.
---
bash_completion | 15 +++++++++++++--
bash-completion-2.12.0/bash_completion | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
Index: bash-completion-2.11/bash_completion
===================================================================
--- bash-completion-2.11.orig/bash_completion
+++ bash-completion-2.11/bash_completion
@@ -2034,8 +2034,19 @@ _complete_as_root()
_longopt()
--- bash-completion-2.12.0/bash_completion
+++ bash-completion-2.12.0/bash_completion 2024-02-23 08:10:16.777791836 +0000
@@ -2984,8 +2984,19 @@ _comp_compgen_commands()
# @since 2.12
_comp_complete_longopt()
{
- local cur prev words cword split
- _init_completion -s || return
- local cur prev words cword was_split comp_args
- _comp_initialize -s -- "$@" || return
+ local cur=${COMP_WORDS[COMP_CWORD]}
+ local prev words cword split
+ local prev words cword was_split comp_args
+
+ if [[ "${cur:0:1}" == '$' ]] ; then
+ compopt -o dirnames +o filenames
@ -27,10 +25,10 @@ Index: bash-completion-2.11/bash_completion
+ compopt +o dirnames -o filenames
+ fi
+
+ if ! _init_completion -s ; then
+ _dollar $cur
+ _comp_initialize -s -- "$@" || {
+ _comp_compgen_dollar "$cur"
+ return
+ fi
+ }
case "${prev,,}" in
--help | --usage | --version)

View File

@ -4,24 +4,22 @@ Allow the smart bash builtin completion if normal completion scripting
does not return anything.
---
bash_completion | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
bash-completion-2.12.0/bash_completion | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: bash-completion-2.11/bash_completion
===================================================================
--- bash-completion-2.11.orig/bash_completion
+++ bash-completion-2.11/bash_completion
@@ -2096,11 +2096,12 @@ _longopt()
complete -F _longopt -o filenames a2ps awk base64 bash bc bison cat chroot colordiff cp \
--- bash-completion-2.12.0/bash_completion
+++ bash-completion-2.12.0/bash_completion 2024-02-23 08:12:55.346856835 +0000
@@ -3047,11 +3047,12 @@ complete -F _comp_complete_longopt -o fi
a2ps awk base64 bash bc bison cat chroot colordiff cp \
csplit cut date df diff dir du enscript expand fmt fold gperf \
grep grub head irb ld ldd less ln m4 md5sum mkdir mkfifo mknod \
grep grub head irb ld ldd less ln m4 mkdir mkfifo mknod \
- mv nl nm objcopy objdump od paste pr ptx readelf rm rmdir \
+ mv nl nm objcopy objdump od paste pr ptx readelf \
sed sha{,1,224,256,384,512}sum shar sort split strip sum tac tail tee \
sed shar sort split strip sum tac tail tee \
texindex touch tr unexpand uniq vdir wc who
complete -F _longopt -o default env netstat seq uname units
complete -F _longopt -o bashdefault -o default -o filenames ls ll la l ls-l lf
+complete -F _longopt -o bashdefault -o default -o filenames rm rmdir
declare -Ag _xspecs
complete -F _comp_complete_longopt -o default env netstat seq uname units
complete -F _comp_complete_longopt -o bashdefault -o default -o filenames ls ll la l ls-l lf
+complete -F _comp_complete_longopt -o bashdefault -o default -o filenames rm rmdir
# @since 2.12
declare -Ag _comp_xspecs

View File

@ -1,15 +1,13 @@
boo#1012212 -- bash tab-autocompletion hangs on TAR-archiving with --create key
---
completions/tar | 2 +-
bash-completion-2.12.0/completions/tar | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: bash-completion-2.11/completions/tar
===================================================================
--- bash-completion-2.11.orig/completions/tar
+++ bash-completion-2.11/completions/tar
@@ -185,7 +185,7 @@ __tar_preparse_cmdline()
first_arg=1
--- bash-completion-2.12.0/completions/tar
+++ bash-completion-2.12.0/completions/tar 2024-02-22 15:03:22.400476120 +0000
@@ -203,7 +203,7 @@ _comp_cmd_tar__preparse_cmdline()
for i in "$@"; do
case "$i" in
- --delete | --test-label)