summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJörn-Thorben Hinz <11910-jth@users.noreply.salsa.debian.org>2022-01-25 15:53:21 +0100
committerJörn-Thorben Hinz <11910-jth@users.noreply.salsa.debian.org>2022-01-26 21:25:23 +0100
commit969349ce82ef6fbb1f65e875eeab84c403f23c88 (patch)
treed8cfc650ce1ad3d1d175b65dfe648849ad0a37b6
parent2c793d2083e6e16509f61cb5b1b38b0884515838 (diff)
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 `/*`.
-rw-r--r--completions/bash/apt2
1 files changed, 1 insertions, 1 deletions
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