summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2022-02-01 15:29:47 +0000
committerJulian Andres Klode <jak@debian.org>2022-02-01 15:29:47 +0000
commit841e66b3597936cca214a3a1ce045b2cec6abfb4 (patch)
tree42e9161a0b2759012d2648e2a20b63db1e7b00b6
parent2c793d2083e6e16509f61cb5b1b38b0884515838 (diff)
parent4ff687f8c8e09ebcbd96e9542625b6b32280e1c3 (diff)
Merge branch 'bash-completion-build-dep-dsc-985899' into 'main'
Bash-completion of .dsc filenames for `apt build-dep` (closes: #985899) See merge request apt-team/apt!215
-rw-r--r--completions/bash/apt10
1 files changed, 7 insertions, 3 deletions
diff --git a/completions/bash/apt b/completions/bash/apt
index 7cf54df1f..f50636776 100644
--- a/completions/bash/apt
+++ b/completions/bash/apt
@@ -197,9 +197,13 @@ _apt()
return 0
;;
source|build-dep|showsrc|policy)
- COMPREPLY=( $( apt-cache --no-generate pkgnames "$cur" \
- 2> /dev/null ) $( apt-cache dumpavail | \
- command grep "^Source: $cur" | sort -u | cut -f2 -d" " ) )
+ if [[ "$command" == build-dep && ( "$cur" == .* || "$cur" == /* || "$cur" == ~* ) ]]; then
+ _filedir "dsc"
+ else
+ COMPREPLY=( $( apt-cache --no-generate pkgnames "$cur" \
+ 2> /dev/null ) $( apt-cache dumpavail | \
+ command grep "^Source: $cur" | sort -u | cut -f2 -d" " ) )
+ fi
return 0
;;
edit-sources)