You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tweak Zsh completions and allow completion on ports tree
- Ensure that mutually exclusive options are not both completed. For
example, in the '-a' specification for the 'bulk' action shown below,
the (-f *) indicates that if '-a' has been specified, then do not
complete either '-f' or a ports tree.
'(-f *)-a[build the whole ports tree]'
- Ensure that mandatory arguments are properly completed. For example, in
the '-p' specifications show below, in the first form, the ports tree is
optional and in the second form it is mandatory.
-p+[specifies which ports tree to use]::tree:_poudriere_pt
-p+[specifies which ports tree to use]:tree:_poudriere_pt
'-t[type of image]::type:((iso iso+mfs iso+zmfs usb usb+mfs usb+zmfs rawdisk zrawdisk tar firmware rawfirmware embedded))'
92
+
'-t[type of image]:type:((iso iso+mfs iso+zmfs usb usb+mfs usb+zmfs rawdisk zrawdisk tar firmware rawfirmware embedded))'
63
93
'-X[file containing the list in cpdup format]:file:_files'
64
-
'-z[set]::'
94
+
'-z[set]:'
65
95
)
66
96
67
97
_jail=(
@@ -72,82 +102,83 @@ _jail=(
72
102
'(-c -d -i -l -k -u -r)-s[start a jail]'
73
103
'(-c -d -i -l -s -u -r)-k[stop a jail]'
74
104
'(-c -d -i -l -s -k -r)-u[update a jail]'
75
-
'(-c -d -i -l -s -k -u)-r[rename a jail to name]::name'
105
+
'(-c -d -i -l -s -k -u)-r[rename a jail to name]:name'
76
106
'-b[build the OS (for use with -m src)]'
77
107
'-q[quiet (do not print the header)]'
78
-
'-J[run buildworld in parallel with n jobs]::'
79
-
'-j[specifies the jailname]::jailname:_poudriere_jail'
80
-
'-v[specify which version of FreeBSD to install in the jail]::version'
81
-
'-a[indicates the TARGET_ARCH of the jail. Such as i386 or amd64]::arch:(amd64 i386)'
82
-
'-f[fs name (tank/jails/myjail) if fs is "none" then do not create on ZFS]::fs:_files -/'
83
-
'-K[build the jail with the kernel]::kernelname'
84
-
'-M[mountpoint]::mountpoint:_files -/'
85
-
'-m[when used with -c, overrides the default method for obtaining and building the jail.]::method:(allbsd ftp-archive ftp git http null src svn svn+file svn+http svn+https svn+ssh tar url)'
86
-
'-P[specify a patch to apply to the source before building]::patch:_files -/'
87
-
'-S[specify a path to the source tree to be used]::srcpath:_files -/'
108
+
'-J[run buildworld in parallel with n jobs]:'
109
+
'-j[specifies the jailname]:jailname:_poudriere_jail'
110
+
'-v[specify which version of FreeBSD to install in the jail]:version'
111
+
'-a[indicates the TARGET_ARCH of the jail. Such as i386 or amd64]:arch:(amd64 i386)'
112
+
'-f[fs name (tank/jails/myjail) if fs is "none" then do not create on ZFS]:fs:_files -/'
113
+
'-K[build the jail with the kernel]:kernelname'
114
+
'-M[mountpoint]:mountpoint:_files -/'
115
+
'-m[when used with -c, overrides the default method for obtaining and building the jail.]:method:(allbsd ftp-archive ftp git http null src svn svn+file svn+http svn+https svn+ssh tar url)'
116
+
'-P[specify a patch to apply to the source before building]:patch:_files -/'
117
+
'-S[specify a path to the source tree to be used]:srcpath:_files -/'
88
118
'-D[do a full git clone without --depth]'
89
-
'-t[version of FreeBSD to upgrade the jail to]::version'
90
-
'-U[specify a url to fetch the sources (with method git and/or svn)]::url'
119
+
'-t[version of FreeBSD to upgrade the jail to]:version'
120
+
'-U[specify a url to fetch the sources (with method git and/or svn)]:url'
91
121
'-x[build and setup native-xtools cross compile tools in jail when building for a different TARGET ARCH than the host]'
92
-
'-C[clean remaining data existing in pourdiere data folder]::clean:(all cache logs packages wrkdirs)'
93
-
'-p[specify which ports tree to start/stop the jail with]::tree:_poudriere_pt'
94
-
'-z[specify which SET the jail to start/stop with]::set'
122
+
'-C[clean remaining data existing in pourdiere data folder]:clean:(all cache logs packages wrkdirs)'
123
+
'-p[specify which ports tree to start/stop the jail with]:tree:_poudriere_pt'
124
+
'-z[specify which SET the jail to start/stop with]:set'
95
125
)
96
126
97
127
_logclean=(
98
128
'(-N)-a[remove all logfiles matching the filter]'
99
129
'(-a)-N[how many logfiles to keep matching the filter per jail/tree/set combination]:count:'
100
130
'-B[build name glob to match on]:glob:'
101
-
'-j[which jail to use for log directories]::name:_poudriere_jail'
102
-
'-p[specify which ports tree to use for log directories]::tree:_poudriere_pt'
131
+
'-j[which jail to use for log directories]:name:_poudriere_jail'
132
+
'-p[specify which ports tree to use for log directories]:tree:_poudriere_pt'
103
133
'-n[do not actually remove anything, just show what would be removed]'
104
134
'-v[be verbose; show more information]'
105
135
'-y[assume yes when deleting and do not prompt for confirmation]'
106
-
'-z[specify which SET to match for logs]::'
136
+
'-z[specify which SET to match for logs]:'
107
137
)
108
138
109
139
_options=(
110
-
'-a[indicates the TARGET_ARCH if no jail is specified]::arch:(amd64 i386)'
140
+
'-a[indicates the TARGET_ARCH if no jail is specified]:arch:(amd64 i386)'
111
141
"(-C)-c[use 'make config' target]::"
112
142
"(-c)-C[use 'make config-conditional' target]::"
113
-
'-f[give the list of ports to set options]:name of file:_files'
114
-
'-j[run on the given jail]::name:_poudriere_jail'
143
+
'(*)-f[give the list of ports to set options]:name of file:_files'
144
+
'-j[run on the given jail]:name:_poudriere_jail'
115
145
'-n[do not configure/show/remove options of dependencies]::'
116
-
'-p[specify on which ports tree the configuration will be done]::tree:_poudriere_pt'
146
+
'-p[specify on which ports tree the configuration will be done]:tree:_poudriere_pt'
117
147
'(-r)-s[show options instead of configuring them]::'
118
148
'(-s)-r[show port options instead of configuring them]::'
119
-
'-z[Specify which SET to use]::'
149
+
'-z[Specify which SET to use]:'
150
+
'(-f)*:cat/port:_poudriere_direct_port'
120
151
)
121
152
122
153
_pkgclean=(
123
154
'(-a -f)-A[remove all packages]'
124
155
'(-A -f)-a[keep all known ports]'
125
156
'(-A -a)-f[get the list of ports to keep from a file]:name of file:_files'
126
-
'-j[which jail to use for packages]::jail name:_poudriere_jail'
127
-
'-J[run n jobs in parallel]::'
157
+
'-j[which jail to use for packages]:jail name:_poudriere_jail'
158
+
'-J[run n jobs in parallel]:'
128
159
'-n[do not actually remove anything, just show what would be removed]::'
129
160
'-N[do not build the package repository when clean completed]'
130
-
'-p[which ports tree to use for packages]::tree:_poudriere_pt'
161
+
'-p[which ports tree to use for packages]:tree:_poudriere_pt'
131
162
'-R[clean RESTRICTED packages after building]'
132
163
'-v[be verbose; show more information. Use twice to enable debug output]'
133
164
'-y[assume yes when deleting and do not confirm]::'
134
-
'-z[specify which SET to use for packages]::'
165
+
'-z[specify which SET to use for packages]:'
135
166
)
136
167
137
168
_ports=(
138
169
'(-d -u -l)-c[create a ports tree]'
139
170
'(-c -u -l)-d[delete a ports tree]'
140
171
'(-c -d -u)-l[lists all available ports trees]'
141
172
'(-c -d -l)-u[update a ports tree]'
142
-
'-U[url where to fetch the ports tree from]::'
143
-
'-B[which branch to use for the svn or git methods]::'
173
+
'-U[url where to fetch the ports tree from]:'
174
+
'-B[which branch to use for the svn or git methods]:'
144
175
'-F[When used with -c, only create the needed filesystems (for ZFS) and directories, but do not populate them.]'
145
-
'-M[the path to the source of a ports tree]::path:_files -/'
146
-
'-f[the name of the filesystem to create for the ports tree]::fs:_files -/'
176
+
'-M[the path to the source of a ports tree]:path:_files -/'
177
+
'-f[the name of the filesystem to create for the ports tree]:fs:_files -/'
147
178
'-k[when used with -d, only unregister the ports tree without removing the files]'
148
-
'-m[when used with -c, specify the method used to create the ports tree]::method:((git null portsnap svn svn+http svn+https svn+file svn+ssh))'
179
+
'-m[when used with -c, specify the method used to create the ports tree]:method:((git null portsnap svn svn+http svn+https svn+file svn+ssh))'
149
180
'-n[when used with -l, only print the name of the ports tree]'
150
-
'-p[specifies the name of the ports tree to work on]::tree:_poudriere_pt'
181
+
'-p[specifies the name of the ports tree to work on]:tree:_poudriere_pt'
151
182
'-q[when used with -l, remove the header in the list view]'
152
183
'-v[show more verbose output]'
153
184
)
@@ -159,29 +190,31 @@ _status=(
159
190
'-B[what buildname to use]:buildname'
160
191
'-c[compact output]'
161
192
'-H[do not print headers and separate fields by a single tab instead of arbitrary white space]'
162
-
'-j[run on the given jail]::name:_poudriere_jail'
163
-
'-p[specify on which ports tree to match for the build]::tree:_poudriere_pt'
193
+
'-j[run on the given jail]:name:_poudriere_jail'
194
+
'-p[specify on which ports tree to match for the build]:tree:_poudriere_pt'
164
195
'-l[show logs instead of URL]'
165
196
'-r[show results]'
166
-
'-z[specify which SET to match for the build]::'
197
+
'-z[specify which SET to match for the build]:'
167
198
)
168
199
169
200
_testport=(
170
-
'-j[run inside the given jail]::name:_poudriere_jail'
171
-
'-B[What buildname to use]::'
201
+
'-j[run inside the given jail]:name:_poudriere_jail'
202
+
'(*)-o[Specify an origin in the portstree]:origin:_poudriere_direct_port'
203
+
'-B[What buildname to use]:'
172
204
'-c[run make config for the given port]::'
173
205
'-i[interactive mode]'
174
206
'-I[advanced interactive mode]'
175
-
'-J[Run n jobs in parallel for dependencies, and optionally run a different number of jobs in parallel while preparing the build]::'
207
+
'-J[Run n jobs in parallel for dependencies, and optionally run a different number of jobs in parallel while preparing the build]:'
176
208
"-k[don't consider failures as fatal; find all failures]"
177
209
'-n[show what will be done, but do not build any packages]'
178
210
'-N[do not build package repository when build of dependencies completed]'
179
-
'-p[specifies which ports tree to use]::tree:_poudriere_pt'
180
-
'-P[use custom prefix]'
181
211
"-S[don't recursively rebuild packages affected by other packages requiring incremental rebuild]"
212
+
'-p[specifies which ports tree to use]:tree:_poudriere_pt'
0 commit comments