summaryrefslogtreecommitdiff
path: root/Completion/Debian/Command
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Debian/Command')
-rw-r--r--Completion/Debian/Command/_apt66
-rw-r--r--Completion/Debian/Command/_aptitude2
-rw-r--r--Completion/Debian/Command/_axi-cache8
-rw-r--r--Completion/Debian/Command/_dpkg12
4 files changed, 85 insertions, 3 deletions
diff --git a/Completion/Debian/Command/_apt b/Completion/Debian/Command/_apt
index b51b2fc74..bf5343a94 100644
--- a/Completion/Debian/Command/_apt
+++ b/Completion/Debian/Command/_apt
@@ -1,11 +1,13 @@
-#compdef apt-get apt-cache apt-cdrom apt-config
+#compdef apt apt-get apt-cache apt-cdrom apt-config apt-mark
_apt () {
case "$service" in
+ apt) _apt-cmd "$@";;
apt-get) _apt-get "$@";;
apt-cache) _apt-cache "$@";;
apt-cdrom) _apt-cdrom "$@";;
apt-config) _apt-config "$@";;
+ apt-mark) _apt-mark "$@";;
*) _message "unknown command $service";;
esac
}
@@ -389,6 +391,38 @@ _apt_consume_long () {
return 0
}
+_apt-cmd () {
+ _apt_arguments _apt-cmd_sm \
+ -h,--help:bool \
+ -v,--version:bool \
+ -c,--config-file:configfile \
+ -o,--option:arbitem \
+ -t,--target-release:release \
+ -- \
+ /$'list\0'/ \| \
+ /$'search\0'/ /$'[^\0]#\0'/ ':strings:pattern:' \| \
+ /$'show\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \
+ /$'update\0'/ \| \
+ \( \
+ /$'install\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \
+ /$'[^\0/]#/'/ /$'[^\0/]#\0'/ ':release name::_apt_releases' \) \| \
+ /$'remove\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# \| \
+ /$'upgrade\0'/ \| \
+ /$'full-upgrade\0'/ \| \
+ /$'edit-sources\0'/ \| \
+ /"[]"/ ':argument-1::compadd "$expl_action[@]" list search show update install remove upgrade full-upgrade edit-sources'
+
+ _apt-cmd () {
+ local expl_action expl_packages
+ _description actions expl_action 'action'
+ _description packages expl_packages 'package'
+
+ _apt-cmd_sm
+ }
+
+ _apt-cmd "$@"
+}
+
_apt-get () {
_apt_arguments _apt-get_sm \
-h,--help:bool \
@@ -586,4 +620,34 @@ _apt_caching_policy () {
/var/lib/dpkg/available -nt "$1" ]]
}
+_apt-mark () {
+ _apt_arguments _apt-mark_sm \
+ -h,--help:bool \
+ -v,--version:bool \
+ -f,--file:configfile \
+ -c,--config-file:configfile \
+ -o,--option:arbitem \
+ -qq:bool \
+ -s:bool \
+ -- \
+ /$'auto\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# \| \
+ /$'manual\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# \| \
+ /$'hold\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# \| \
+ /$'unhold\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# \| \
+ /$'showauto\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# \| \
+ /$'showmanual\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# \| \
+ /$'showhold\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# \| \
+ /"[]"/ ':argument-1::compadd "$expl_action[@]" auto manual hold unhold showauto showmanual showhold'
+
+ _apt-mark () {
+ local expl_action expl_packages
+ _description actions expl_action 'action'
+ _description packages expl_packages 'package'
+
+ _apt-mark_sm
+ }
+
+ _apt-mark "$@"
+}
+
_apt "$@"
diff --git a/Completion/Debian/Command/_aptitude b/Completion/Debian/Command/_aptitude
index 2c462e462..2cb211149 100644
--- a/Completion/Debian/Command/_aptitude
+++ b/Completion/Debian/Command/_aptitude
@@ -70,6 +70,8 @@ _arguments -C \
'--schedule-only[schedule operations to be performed in the future]' \
'--purge-unused[purge unused packages instead of removing]' \
'--visual-preview[start up the visual interface and display its preview screen]' \
+ '--full-resolver[attempts to resolve conflicts with a higher risk of breakage]' \
+ '--safe-resolver[attempts to resolve conflicts with a lower risk of breakage]' \
'-S[load the extended state information from non-standard state file]:state file:_files' \
'-u[begin updating the package lists as soon as the program starts]' \
'-i[displays a download preview when the program starts]' \
diff --git a/Completion/Debian/Command/_axi-cache b/Completion/Debian/Command/_axi-cache
index 0c137c700..bdefdd979 100644
--- a/Completion/Debian/Command/_axi-cache
+++ b/Completion/Debian/Command/_axi-cache
@@ -11,10 +11,11 @@ _arguments \
if (( CURRENT == 2 )); then
_wanted tag expl 'axi-cache commands' \
- compadd help search more last show again
+ compadd help search more last show again info \
+ rdetails depends madison policy showpkg showsrc
else
case "$words[2]" in
- (search|show|again)
+ (search|show|again|rdetails|depends|madison|policy|showpkg|showsrc)
_wanted tag expl 'terms/query' \
compadd -- $($service $words[2] --tabcomplete=plain -- $words[CURRENT])
;;
@@ -22,6 +23,9 @@ else
_wanted tag expl 'count' \
compadd -- 1 2 3 4 5 6 7 8 9 0
;;
+ (help|info)
+ # no args
+ ;;
(*)
_files
;;
diff --git a/Completion/Debian/Command/_dpkg b/Completion/Debian/Command/_dpkg
index e7184e7cc..3503d09b9 100644
--- a/Completion/Debian/Command/_dpkg
+++ b/Completion/Debian/Command/_dpkg
@@ -50,6 +50,9 @@ _dpkg_actions=(
'--yet-to-unpack[list uninstalled]'
'--print-architecture[print target architecture]'
'--print-installation-architecture'
+ '--print-foreign-architectures[print list of extra architectures]'
+ '--add-architecture[add extra architecture]:architecture:->add_architecture'
+ '--remove-architecture[remove extra architecture]:architecture:->remove_architecture'
'--compare-versions[compare version numbers]:*::expression:= ->compare_versions'
)
@@ -179,4 +182,13 @@ case "$state" in
_call_function ret _dpkg_$state && return ret
_files
;;
+ add_architecture)
+ _call_function ret _dpkg_$state && return ret
+ _wanted architecture expl 'extra architecture' \
+ compadd ${(f)"$(dpkg-architecture -L 2>/dev/null)"}
+ ;;
+ remove_architecture)
+ _call_function ret _dpkg_$state && return ret
+ _wanted architecture expl 'extra architecture' \
+ compadd ${(f)"$(dpkg --print-foreign-architectures 2>/dev/null)"}
esac