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