mirror of
https://github.com/bertptrs/vimconfig.git
synced 2025-12-25 20:40:32 +01:00
Autocompletion for pactree
This commit is contained in:
24
zsh/.config/zsh/completions/_pactree
Normal file
24
zsh/.config/zsh/completions/_pactree
Normal 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:
|
||||
Reference in New Issue
Block a user