diff options
| -rw-r--r-- | completions/bash/apt | 10 |
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) |
