From 969349ce82ef6fbb1f65e875eeab84c403f23c88 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:53:21 +0100 Subject: Also bash-complete .deb filenames after `apt install` for paths starting with ~ At the time the bash-completion runs, the ~ (or even ~user) is not yet expanded to /home/user, so it did not match the existing comparison with `/*`. --- completions/bash/apt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/completions/bash/apt b/completions/bash/apt index 7cf54df1f..0e5d6f808 100644 --- a/completions/bash/apt +++ b/completions/bash/apt @@ -191,7 +191,7 @@ _apt() install) COMPREPLY=( $( apt-cache --no-generate pkgnames "$cur" \ 2> /dev/null ) ) - if [[ "$cur" == ./* || "$cur" == /* ]]; then + if [[ "$cur" == ./* || "$cur" == /* || "$cur" == ~* ]]; then _filedir "deb" fi return 0 -- cgit v1.2.3-70-g09d2