diff options
| author | Ville Skyttä <ville.skytta@iki.fi> | 2025-12-03 01:10:30 +0200 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2026-01-05 21:22:11 +0000 |
| commit | d25b2b2fa51631ff324fc296b925f896c7fdad5e (patch) | |
| tree | 652d2ec64bf30d818bf8483abf19aa6014655a2f | |
| parent | 0236f05741ba4565ab3bab93e5cb18075ea86bcb (diff) | |
bash-complete basic list search patterns
| -rw-r--r-- | completions/bash/apt | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/completions/bash/apt b/completions/bash/apt index c249f97b1..571c6663b 100644 --- a/completions/bash/apt +++ b/completions/bash/apt @@ -187,7 +187,26 @@ _apt() fi return 0 ;; - show|list|download|changelog|depends|rdepends|why-not) + list) + if [[ $cur == ?(\\)\?* ]]; then + compopt -o filenames # escape to avoid ? filename matches + COMPREPLY=( $( compgen -P '?' -W ' + automatic + broken + config-files + essential + garbage + installed + obsolete + phasing + security + upgradable + virtual + ' -- "${cur#?(\\)\?}" ) ) + return 0 + fi + ;& + show|download|changelog|depends|rdepends|why-not) COMPREPLY=( $( apt-cache --no-generate pkgnames "$cur" \ 2> /dev/null ) ) return 0 |
