File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,9 @@ _comp_cmd_apt_get()
34
34
_comp_xfunc_apt_get_installed_packages
35
35
;;
36
36
source)
37
+ # Prefer `apt-cache` in the same dir as command
38
+ local pathcmd
39
+ pathcmd=$( type -P " $1 " ) && local PATH=${pathcmd%/* } :$PATH
37
40
COMPREPLY=($( _comp_xfunc apt-cache packages)
38
41
$( compgen -W " $( apt-cache dumpavail |
39
42
awk ' $1 == "Source:" { print $2 }' | sort -u) " -- " $cur " ) )
@@ -78,6 +81,9 @@ _comp_cmd_apt_get()
78
81
return
79
82
;;
80
83
--target-release | --default-release | -${noargopts} t)
84
+ # Prefer `apt-cache` in the same dir as command
85
+ local pathcmd
86
+ pathcmd=$( type -P " $1 " ) && local PATH=${pathcmd%/* } :$PATH
81
87
COMPREPLY=($( compgen -W " $( apt-cache policy | command sed -ne \
82
88
' s/^ *release.*[ ,]o=\(Debian\|Ubuntu\),a=\(\w*\).*/\2/p' ) " \
83
89
-- " $cur " ) )
You can’t perform that action at this time.
0 commit comments