From ca5557936211bd670a203e6e1f8d75fda2d61819 Mon Sep 17 00:00:00 2001 From: Jörn-Thorben Hinz <11910-jth@users.noreply.salsa.debian.org> Date: Tue, 25 Jan 2022 15:57:22 +0100 Subject: Bash-complete either package name or .deb filename for `apt install` Should provide a tiny speed-up when someone already started typing either one in the current argument. --- completions/bash/apt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/completions/bash/apt b/completions/bash/apt index 0e5d6f808..61101d839 100644 --- a/completions/bash/apt +++ b/completions/bash/apt @@ -189,10 +189,11 @@ _apt() return 0 ;; install) - COMPREPLY=( $( apt-cache --no-generate pkgnames "$cur" \ - 2> /dev/null ) ) if [[ "$cur" == ./* || "$cur" == /* || "$cur" == ~* ]]; then _filedir "deb" + else + COMPREPLY=( $( apt-cache --no-generate pkgnames "$cur" \ + 2> /dev/null ) ) fi return 0 ;; -- cgit v1.2.3-70-g09d2