Permalink
Browse files

apt-get: Complete *.deb on install if argument contains a slash

  • Loading branch information...
scop committed Oct 12, 2017
1 parent 9035568 commit a36231e81eaeb272777abe581dce06e988f219a3
View
@@ -30,8 +30,12 @@ _apt_get()
command grep "^Source: $cur" | sort -u | cut -f2 -d" " ) )
;;
*)
COMPREPLY=( $( apt-cache --no-generate pkgnames "$cur" \
2> /dev/null ) )
if [[ $special == install && $cur == */* ]]; then
_filedir deb
else
COMPREPLY=( $( apt-cache --no-generate pkgnames "$cur" \
2>/dev/null ) )
fi
;;
esac
return
@@ -4,7 +4,7 @@ proc setup {} {
proc teardown {} {
assert_env_unmodified
assert_env_unmodified {/OLDPWD=/d}
}
@@ -22,4 +22,8 @@ expect {
sync_after_int
assert_complete_dir "./bash-completion-test-subject.deb" "apt-get install ./" "$::srcdir/fixtures/dpkg"
sync_after_int
teardown

0 comments on commit a36231e

Please sign in to comment.