What is this?

zsh-users/zsh-completions * GitHub

This projects aims at gathering/developing new completion scripts that are not available in Zsh yet. The scripts are meant to be contributed to the Zsh project when stable enough.

Installation

% mkdir ~/.zsh
% cd ~/.zsh
% git clone git://github.com/zsh-users/zsh-completions.git
% vim ~/.zshrc
fpath=(~/.zsh/zsh-completions/src $fpath)
autoload -U compinit
compinit
% source ~/.zshrc

How it works (on FreeBSD)?

% pkg [Tab]
add                 -- Registers a package and installs it on the system
audit               -- Reports vulnerable packages
autoremove          -- Removes orphan packages
backup              -- Backs-up and restores the local package database
check               -- Checks for missing dependencies and database consistency
clean               -- Cleans old packages from the cache
convert             -- Convert database from/to pkgng
create              -- Creates software package distributions
fetch               -- Fetches packages from a remote repository
help                -- Displays help information
info                -- Displays information about installed packages
install             -- Installs packages from remote package repositories
query               -- Queries information about installed packages
register            -- Registers a package into the local database
remove      delete  -- Deletes packages from the database and the system
repo                -- Creates a package repository catalogue
rquery              -- Queries information in repository catalogues
search              -- Performs a search of package repository catalogues
set                 -- Modifies information about packages in the local database
shell               -- Opens a debug shell
shlib               -- Displays which packages link against a specific shared library
stats               -- Displays package database statistics
update              -- Updates package repository catalogues
updating            -- Displays UPDATING information for a package
upgrade             -- Performs upgrades of packaged software distributions
version             -- Displays the versions of installed packages
which               -- Displays which package installed a specific file

It shows not only commands but help documents.