1
0
mirror of https://github.com/bertptrs/vimconfig.git synced 2025-12-25 12:30:32 +01:00

Autocompletion for pactree

This commit is contained in:
2019-06-05 14:25:00 +02:00
parent 7065afbace
commit 93aa263b40

View File

@@ -0,0 +1,24 @@
#compdef _pactree pactree
function _pactree() {
_arguments \
{-a,--ascii}"[use ASCII characters for tree formatting]" \
{-b,--dbpath}"[set an alternate database location]:location:_files" \
{-c,--color}"[colorize output]" \
{-d,--depth}"[limit the depth of recursion]:depth:" \
{-g,--graph}"[generate output for graphviz's dot]" \
{-h,--help}"[display this help message]" \
{-l,--linear}"[enable linear output]" \
{-r,--reverse}"[list packages that depend on the named package]" \
{-s,--sync}"[search sync databases instead of local]" \
{-u,--unique}"[show dependencies with no duplicates (implies -l)]" \
{-v,--version}"[display the version]" \
":PACKAGE:_pactree_installed_packages"
}
function _pactree_installed_packages() {
local packages=($(pacman -Qq))
_describe PACKAGES packages
}
# vim: set ft=zsh: