We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
apt-cache
1 parent a46ccf1 commit a731bfdCopy full SHA for a731bfd
completions/apt-get
@@ -34,6 +34,9 @@ _comp_cmd_apt_get()
34
_comp_xfunc_apt_get_installed_packages
35
;;
36
source)
37
+ # Prefer `apt-cache` in the same dir as command
38
+ local pathcmd
39
+ pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH
40
COMPREPLY=($(_comp_xfunc apt-cache packages)
41
$(compgen -W "$(apt-cache dumpavail |
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
85
86
87
COMPREPLY=($(compgen -W "$(apt-cache policy | command sed -ne \
88
's/^ *release.*[ ,]o=\(Debian\|Ubuntu\),a=\(\w*\).*/\2/p')" \
89
-- "$cur"))
0 commit comments