4 compadd "$@" - ${PKG_DBDIR:-/var/db/pkg}/*(/:t)
8 local ret=1 _fbsd_ports _fbsd_cat
9 _fbsd_cat=(${PORTSDIR:-/usr/ports}/[a-z]*(/:t))
10 if [[ $PREFIX != */* ]] ; then
11 _wanted cat_packages expl 'category/ports' compadd -S '/' $_fbsd_cat
14 _fbsd_ports=(${PORTSDIR:-/usr/ports}/$IPREFIX/*(/:t))
15 _wanted cat_packages expl 'category/ports' compadd $_fbsd_ports
20 _portmaster_pkgs_and_ports() {
22 _portmaster_pkgs && ret=0
23 _portmaster_ports && ret=0
29 local specific_args common_args expunge_args standalone_args kid
31 '--clean-distfiles[delete distfiles not associated with an installed ports: interactive]'
32 '--clean-distfiles-all[delete distfiles not associated with an installed ports]'
33 '--check-depends[cross-check and update dependency information for all ports]'
34 '--check-port-dbdir[check for stale entries in /var/db/ports]'
35 '-l[list all installed ports by category]'
36 '-L[list all installed ports by category, and search for updates]'
37 {'(-help)-h','(-h)--help'}'[display help message]:'
38 '--version[display the version only]:'
41 '(-s -r -o)-e[expunge port using pkg_delete, and remove all distfiles]:name of port:_portmaster_pkgs'
42 '(-e -r -o)-s[clean out stale ports that used to be depended on]'
43 '(-e -s -o)-r[rebuild the specified port, and all ports that depend on it]:name/glob of port:_portmaster_pkgs'
44 '(-e -s -r)-o[replace the installed port with a port from a different origin]:new port dir:_portmaster_ports'
47 '(-b)-B[prevents creation of the backup package for the installed port]'
48 '(-d)-D[no cleaning of distfiles]'
49 '(-D)-d[always clean distfiles]'
52 "(-G)--force-config[run 'make config' for all ports]"
53 "-C[prevents 'make clean' from being run before building]"
54 '-H[hide details of the port build and install in a log file]'
55 "-K[prevents 'make clean' from being run after building]"
56 '(-B)-b[create and keep a backup package of an installed port]'
57 '-g[create a package of the new port]'
58 '-n[run through configure, but do not make or install any ports]'
59 '-t[recurse dependencies thoroughly, using all-depends-list]'
61 '-w[save old shared libraries before deinstall]'
63 '(-i)-f[always rebuild ports]'
64 '(-f)-i[interactive update mode]'
65 '-m[any arguments to supply to make]:arguments for make:'
66 '-x[avoid building or updating ports that match this pattern]:glob pattern to exclude from building:'
67 '-p[specify the full path to a port directory]:a port directory:'
68 '--show-work[show what dependent ports are, and are not installed]'
69 '-R[restart an update, skipping ports already up to date]'
70 '-a[check all ports, update as necessary]'
71 '-F[fetch distfiles only]'
75 if (( CURRENT == 2 ));then
79 '*:Packages and Ports:_portmaster_pkgs_and_ports'
82 --clean-distfiles|--clean-distfiles-all|--check-depends|--check-port-dbdir|--version|-help|-h)
86 if (( $words[(I)-(e|r)] ));then
88 '*:Packages:_portmaster_pkgs'
89 elif (( kid=$words[(I)-o] ));then
90 if (( CURRENT == $kid + 1 ));then
92 '*:Ports replacing:_portmaster_ports'
93 elif (( CURRENT == $kid + 2 )); then
95 '*:Package to replace:_portmaster_pkgs'
99 elif (( $words[(I)-s] ));then
104 '*:Packages and Ports:_portmaster_pkgs_and_ports'