]> git.ipfire.org Git - thirdparty/systemd.git/blob - shell-completion/zsh/_systemd
zsh_completion: Split out zsh _journalctl
[thirdparty/systemd.git] / shell-completion / zsh / _systemd
1 #compdef localectl timedatectl systemd-coredumpctl udevadm systemd-analyze systemd-cat systemd-ask-password systemd-cgls systemd-cgtop systemd-delta systemd-detect-virt systemd-inhibit systemd-machine-id-setup systemd-notify systemd-nspawn systemd-tmpfiles systemd-tty-ask-password-agent machinectl
2
3 _ctls()
4 {
5 local curcontext="$curcontext" state lstate line
6 case "$service" in
7 localectl)
8 _arguments \
9 {-h,--help}'[Show this help]' \
10 '--version[Show package version]' \
11 "--no-convert[Don't convert keyboard mappings]" \
12 '--no-pager[Do not pipe output into a pager]' \
13 '--no-ask-password[Do not prompt for password]' \
14 {-H,--host=}'[Operate on remote host]:userathost:_hosts_or_user_at_host' \
15 '*::localectl commands:_localectl_command'
16 ;;
17 systemd-coredumpctl)
18 _arguments \
19 {-o,--output=}'[Write output to FILE]:output file:_files' \
20 '--no-pager[Do not pipe output into a pager]' \
21 {-h,--help}'[Show this help]' \
22 '--version[Show package version]' \
23 '*::systemd-coredumpctl commands:_systemd-coredumpctl_command'
24
25 ;;
26 timedatectl)
27 _arguments -s \
28 {-h,--help}'[Show this help]' \
29 '--version[Show package version]' \
30 '--adjust-system-clock[Adjust system clock when changing local RTC mode]' \
31 '--no-pager[Do not pipe output into a pager]' \
32 '--no-ask-password[Do not prompt for password]' \
33 {-H,--host=}'[Operate on remote host]:userathost:_hosts_or_user_at_host' \
34 '*::timedatectl commands:_timedatectl_command'
35 ;;
36 udevadm)
37 _arguments \
38 '--debug[Print debug messages to stderr]' \
39 '--version[Print version number]' \
40 '--help[Print help text]' \
41 '*::udevadm commands:_udevadm_command'
42 ;;
43 systemd-analyze)
44 _arguments \
45 {-h,--help}'[Show help text.]' \
46 '--user[Shows performance data of user sessions instead of the system manager.]' \
47 '--order[When generating graph for dot, show only order]' \
48 '--require[When generating graph for dot, show only requirement]' \
49 '*::systemd-analyze commands:_systemd_analyze_command'
50 ;;
51 systemd-ask-password)
52 _arguments \
53 {-h,--help}'[Show this help]' \
54 '--icon=[Icon name]' \
55 '--timeout=[Timeout in sec]' \
56 '--no-tty[Ask question via agent even on TTY]' \
57 '--accept-cached[Accept cached passwords]' \
58 '--multiple[List multiple passwords if available]'
59 ;;
60 systemd-cat)
61 _arguments \
62 {-h,--help}'[Show this help]' \
63 '--version[Show package version.]' \
64 {-t,--identifier=}'[Set syslog identifier.]' \
65 {-p,--priority=}'[Set priority value.]:value:({0..7})' \
66 '--level-prefix=[Control whether level prefix shall be parsed.]:boolean:(1 0)' \
67 ':Message'
68 ;;
69 systemd-cgls)
70 _arguments \
71 {-h,--help}'[Show this help]' \
72 '--version[Show package version]' \
73 '--no-pager[Do not pipe output into a pager]' \
74 {-a,--all}'[Show all groups, including empty]' \
75 '-k[Include kernel threads in output]' \
76 ':cgroups:(cpuset cpu cpuacct memory devices freezer net_cls blkio)'
77 ;;
78 systemd-cgtop)
79 _arguments \
80 {-h,--help}'[Show this help]' \
81 '--version[Print version and exit]' \
82 '(-c -m -i -t)-p[Order by path]' \
83 '(-c -p -m -i)-t[Order by number of tasks]' \
84 '(-m -p -i -t)-c[Order by CPU load]' \
85 '(-c -p -i -t)-m[Order by memory load]' \
86 '(-c -m -p -t)-i[Order by IO load]' \
87 {-d,--delay=}'[Specify delay]' \
88 {-n,--iterations=}'[Run for N iterations before exiting]' \
89 {-b,--batch}'[Run in batch mode, accepting no input]' \
90 '--depth=[Maximum traversal depth]'
91 ;;
92 systemd-delta)
93 _arguments \
94 {-h,--help}'[Show this help]' \
95 '--version[Show package version]' \
96 '--no-pager[Do not pipe output into a pager]' \
97 '--diff=[Show a diff when overridden files differ]:boolean:(1 0)' \
98 {-t,--type=}'[Only display a selected set of override types]:types:(masked equivalent redirected overridden unchanged)' \
99 ':SUFFIX:(tmpfiles.d sysctl.d systemd/system)'
100 ;;
101 systemd-detect-virt)
102 _arguments \
103 {-h,--help}'[Show this help]' \
104 '--version[Show package version]' \
105 {-c,--container}'[Only detect whether we are run in a container]' \
106 {-v,--vm}'[Only detect whether we are run in a VM]' \
107 {-q,--quiet}"[Don't output anything, just set return value]"
108 ;;
109 systemd-inhibit)
110 _arguments \
111 {-h,--help}'[Show this help]' \
112 '--version[Show package version]' \
113 '--what=[Operations to inhibit]:options:(shutdown sleep idle handle-power-key handle-suspend-key handle-hibernate-key handle-lid-switch)' \
114 '--who=[A descriptive string who is inhibiting]' \
115 '--why=[A descriptive string why is being inhibited]' \
116 '--mode=[One of block or delay]' \
117 '--list[List active inhibitors]' \
118 '*:commands:_systemd_inhibit_command'
119 ;;
120 systemd-machine-id-setup)
121 _arguments \
122 {-h,--help}'[Show this help]' \
123 '--version[Show package version]'
124 ;;
125 systemd-notify)
126 _arguments \
127 {-h,--help}'[Show this help]' \
128 '--version[Show package version]' \
129 '--ready[Inform the init system about service start-up completion.]' \
130 '--pid=[Inform the init system about the main PID of the daemon]' \
131 '--status=[Send a free-form status string for the daemon to the init systemd]' \
132 '--booted[Returns 0 if the system was booted up with systemd]' \
133 '--readahead=[Controls disk read-ahead operations]:arguments:(cancel done noreply)'
134 ;;
135 systemd-nspawn)
136 _arguments \
137 {-h,--help}'[Show this help]' \
138 {--directory=,-D}'[Directory to use as file system root for the namespace container. If omitted the current directory will be used.]:directories:_directories' \
139 {--boot,-b}'[Automatically search for an init binary and invoke it instead of a shell or a user supplied program.]' \
140 {--user=,-u}'[Run the command under specified user, create home directory and cd into it.]' \
141 '--uuid=[Set the specified uuid for the container.]' \
142 {--controllers=,-C}'[Makes the container appear in other hierarchies than the name=systemd:/ one. Takes a comma-separated list of controllers.]' \
143 '--private-network[Turn off networking in the container. This makes all network interfaces unavailable in the container, with the exception of the loopback device.]' \
144 '--read-only[Mount the root file system read only for the container.]' \
145 '--capability=[List one or more additional capabilities to grant the container.]:capabilities:_systemd-nspawn' \
146 "--link-journal=[Control whether the container's journal shall be made visible to the host system.]:options:(no, host, guest, auto)" \
147 '-j[Equivalent to --link-journal=guest.]'
148 ;;
149 systemd-tmpfiles)
150 _arguments \
151 '--create[Create, set ownership/permissions based on the config files.]' \
152 '--clean[Clean up all files and directories with an age parameter configured.]' \
153 '--remove[All files and directories marked with r, R in the configuration files are removed.]' \
154 '--prefix=[Only apply rules that apply to paths with the specified prefix.]' \
155 '--exclude-prefix=[Ignore rules that apply to paths with the specified prefix.]' \
156 '--help[Prints a short help text and exits.]' \
157 '*::files:_files'
158 ;;
159 systemd-tty-ask-password-agent)
160 _arguments \
161 {-h,--help}'[Prints a short help text and exits.]' \
162 '--version[Prints a short version string and exits.]' \
163 '--list[Lists all currently pending system password requests.]' \
164 '--query[Process all currently pending system password requests by querying the user on the calling TTY.]' \
165 '--watch[Continuously process password requests.]' \
166 '--wall[Forward password requests to wall(1).]' \
167 '--plymouth[Ask question with plymouth(8).]' \
168 '--console[Ask question on /dev/console.]'
169 ;;
170 machinectl)
171 _arguments \
172 {-h,--help}'[Prints a short help text and exits.]' \
173 '--version[Prints a short version string and exits.]' \
174 {-p,--property=}'[Limit output to specified property.]:property:(Name Id Timestamp TimestampMonotonic Service Scope Leader Class State RootDirectory)' \
175 {-a,--all}'[Show all proerties]' \
176 (-l,--full)'[Do not ellipsize cgroup members]' \
177 '--no-pager[Do not pipe output into a pager]' \
178 '--no-ask-password[Do not ask for system passwords]' \
179 '--kill-who=[Who to send signal to]:killwho:(leader all)' \
180 {-s,--signal=}'[Which signal to send]:signal:_signals' \
181 {-H,--host=}'[Show information for remote host]:userathost:_hosts_or_user_at_host' \
182 {-P,--privileged}'[Acquire privileges before execution]' \
183 '*::machinectl command:_machinectl_command'
184 ;;
185 *) _message 'eh?' ;;
186 esac
187 }
188
189 _systemd-nspawn(){
190 local -a _caps
191 _caps=( CAP_CHOWN CAP_DAC_OVERRIDE CAP_DAC_READ_SEARCH
192 CAP_FOWNER CAP_FSETID CAP_IPC_OWNER CAP_KILL CAP_LEASE CAP_LINUX_IMMUTABLE
193 CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW CAP_SETGID CAP_SETFCAP CAP_SETPCAP
194 CAP_SETUID CAP_SYS_ADMIN CAP_SYS_CHROOT CAP_SYS_NICE CAP_SYS_PTRACE CAP_SYS_TTY_CONFIG
195 CAP_SYS_RESOURCE CAP_SYS_BOOT )
196 _values -s , 'capabilities' "$_caps[@]"
197 }
198
199 _systemd_inhibit_command(){
200 if (( CURRENT == 1 )); then
201 compset -q
202 _normal
203 else
204 local n=${words[(b:2:i)[^-]*]}
205 if (( n <= CURRENT )); then
206 compset -n $n
207 _alternative \
208 'files:file:_files' \
209 'commands:command:_normal' && return 0
210 fi
211 _default
212 fi
213
214 }
215
216 _systemd_analyze_command(){
217 local -a _systemd_analyze_cmds
218 # Descriptions taken from systemd-analyze --help.
219 _systemd_analyze_cmds=(
220 'time:Print time spent in the kernel before reaching userspace'
221 'blame:Print list of running units ordered by time to init'
222 'critical-chain:Print a tree of the time critical chain of units'
223 'plot:Output SVG graphic showing service initialization'
224 'dot:Dump dependency graph (in dot(1) format)'
225 )
226
227 if (( CURRENT == 1 )); then
228 _describe "options" _systemd_analyze_cmds
229 else
230 _message "no more options"
231 fi
232 }
233
234 _hosts_or_user_at_host()
235 {
236 _alternative \
237 'users-hosts:: _user_at_host' \
238 'hosts:: _hosts'
239 }
240
241 _outputmodes() {
242 local -a _output_opts
243 _output_opts=(short short-monotonic verbose export json json-pretty json-see cat)
244 _describe -t output 'output mode' _output_opts || compadd "$@"
245 }
246
247 _localectl_set-locale() {
248 local -a _confs _locales
249 local expl suf
250 _locales=( ${(f)"$(_call_program locales "$service" list-locales)"} )
251 _confs=( ${${(f)"$(_call_program confs "locale 2>/dev/null")"}%\=*} )
252 if [[ -prefix 1 *\= ]]; then
253 local conf=${PREFIX%%\=*}
254 compset -P1 '*='
255 _wanted locales expl "locales configs" \
256 _combination localeconfs confs=$conf locales "$@" -
257 else
258 compadd -S '=' $_confs
259 fi
260 }
261
262 _localectl_set-keymap() {
263 local -a _keymaps
264 _keymaps=( ${(f)"$(_call_program locales "$service" list-keymaps)"} )
265 if (( CURRENT <= 3 )); then
266 _describe keymaps _keymaps
267 else
268 _message "no more options"
269 fi
270 }
271
272 _localectl_set-x11-keymap() {
273 if (( $+commands[pkg-config] )); then
274 local -a _file _layout _model _variant _options
275 local _xorg_lst
276 _xorg_lst=${"$($commands[pkg-config] xkeyboard-config --variable=xkb_base)"}
277 _file=( ${(ps:\n\!:)"$(<$_xorg_lst/rules/xorg.lst)"} )
278 _layout=( ${${${(M)${(f)_file[1]}:# *}# }%% *} )
279 _model=( ${${${(M)${(f)_file[2]}:# *}# }%% *} )
280 _variant=( ${${${(M)${(f)_file[3]}:# *}# }%% *} )
281 _options=( ${${${(M)${(f)_file[4]}:# *}# }%% *} )
282 #_layout=( ${(f)"$( echo $_file[1] | awk '/^ / {print $1}' )"} )
283 #_model=( ${(f)"$(echo $_file[2] | awk '/^ / {print $1}')"} )
284 #_variant=( ${(f)"$(echo $_file[3] | awk '/^ / {print $1}')"} )
285 #_options=( ${(f)"$(echo ${_file[4]//:/\\:} | awk '/^ / {print $1}')"} )
286
287 case $CURRENT in
288 2) _describe layouts _layout ;;
289 3) _describe models _model;;
290 4) _describe variants _variant;;
291 5) _describe options _options;;
292 *) _message "no more options"
293 esac
294 fi
295 }
296
297
298 _localectl_command() {
299 local -a _localectl_cmds
300 _localectl_cmds=(
301 'status:Show current locale settings'
302 'set-locale:Set system locale'
303 'list-locales:Show known locales'
304 'set-keymap:Set virtual console keyboard mapping'
305 'list-keymaps:Show known virtual console keyboard mappings'
306 'set-x11-keymap:Set X11 keyboard mapping'
307 )
308 if (( CURRENT == 1 )); then
309 _describe -t commands 'localectl command' _localectl_cmds
310 else
311 local curcontext="$curcontext"
312 cmd="${${_localectl_cmds[(r)$words[1]:*]%%:*}}"
313 if (( $+functions[_localectl_$cmd] )); then
314 _localectl_$cmd
315 else
316 _message "no more options"
317 fi
318 fi
319 }
320
321 _timedatectl_set-timezone(){
322 local -a _timezones
323 _timezones=( ${(f)"$(_call_program timezones "${service}" list-timezones)"} )
324 compadd "$_timezones[@]"
325 }
326
327 _timedatectl_set-time(){
328 _message "YYYY-MM-DD HH:MM:SS"
329 }
330
331 _timedatectl_set-local-rtc(){
332 local -a _options
333 _options=(
334 '0:Maintain RTC in universal time'
335 '1:Maintain RTC in local time'
336 )
337 _describe options _options
338 }
339
340 _timedatectl_set-ntp(){
341 local -a _options
342 _options=(
343 '0:Disable NTP based network time configuration'
344 '1:Enable NTP based network time configuration'
345 )
346 _describe options _options
347 }
348
349 _timedatectl_command(){
350 local -a _timedatectl_cmds
351 _timedatectl_cmds=(
352 'status:Show current time settings'
353 'set-time:Set system time'
354 'set-timezone:Set system timezone'
355 'list-timezones:Show known timezones'
356 'set-local-rtc:Control whether RTC is in local time'
357 'set-ntp:Control whether NTP is enabled'
358 )
359 if (( CURRENT == 1 )); then
360 _describe -t commands 'timedatectl command' _timedatectl_cmds
361 else
362 local curcontext="$curcontext"
363 cmd="${${_timedatectl_cmds[(r)$words[1]:*]%%:*}}"
364 if (( $#cmd )); then
365 if (( $+functions[_timedatectl_$cmd] )); then
366 _timedatectl_$cmd
367 else
368 _message "no more options"
369 fi
370 else
371 _message "unknown timedatectl command: $words[1]"
372 fi
373 fi
374 }
375 _systemd-coredumpctl_command(){
376 local -a _systemd_coredumpctl_cmds
377 _systemd_coredumpctl_cmds=(
378 'list:List available coredumps'
379 'dump:Print coredump to std'
380 )
381 if (( CURRENT == 1 )); then
382 _describe -t commands 'systemd-coredumpctl command' _systemd_coredumpctl_cmds
383 else
384 local curcontext="$curcontext"
385 local -a _dumps
386 cmd="${${_systemd_coredumpctl_cmds[(r)$words[1]:*]%%:*}}"
387 if (( $#cmd )); then
388 # user can set zstyle ':completion:*:*:systemd-coredumpctl:*' sort no for coredumps to be ordered by date, otherwise they get ordered by pid
389 _dumps=( "${(foa)$(systemd-coredumpctl list | awk 'BEGIN{OFS=":"} /^\s/ {sub(/[[ \t]+/, ""); print $5,$0}' 2>/dev/null)}" )
390 if [[ -n "$_dumps" ]]; then
391 _describe -t pids 'coredumps' _dumps
392 else
393 _message "no coredumps"
394 fi
395 else
396 _message "no more options"
397 fi
398
399 fi
400
401 }
402
403 (( $+functions[_machinectl_command] )) || _machinectl_command()
404 {
405 local -a _machinectl_cmds
406 _machinectl_cmds=(
407 "list:List currently running VMs/containers"
408 "status:Show VM/container status"
409 "show:Show properties of one or more VMs/containers"
410 "terminate:Terminate one or more VMs/containers"
411 "kill:Send signal to process or a VM/container"
412 )
413 if (( CURRENT == 1 )); then
414 _describe -t commands 'machinectl command' _machinectl_cmds || compadd "$@"
415 else
416 local curcontext="$curcontext"
417 cmd="${${_machinectl_cmds[(r)$words[1]:*]%%:*}}"
418 if (( $#cmd )); then
419 case $cmd in
420 list) msg="no options" ;;
421 *)
422 _machines=( "${(foa)$(machinectl list | awk '{print $1}')}" )
423 if [[ -n "$_machines" ]]; then
424 _describe 'machines' _machines
425 else
426 _message 'no machines'
427 fi
428 esac
429 else
430 _message "no more options"
431 fi
432 fi
433 }
434
435 _udevadm_info(){
436 _arguments \
437 '--query=[Query the database for specified type of device data. It needs the --path or --name to identify the specified device.]:type:(name symlink path property all)' \
438 '--path=[The devpath of the device to query.]:sys files:_files -P /sys/ -W /sys' \
439 '--name=[The name of the device node or a symlink to query]:device files:_files -P /dev/ -W /dev' \
440 '--root[Print absolute paths in name or symlink query.]' \
441 '--attribute-walk[Print all sysfs properties of the specified device that can be used in udev rules to match the specified device]' \
442 '--export[Print output as key/value pairs.]' \
443 '--export-prefix=[Add a prefix to the key name of exported values.]:prefix' \
444 '--device-id-of-file=[Print major/minor numbers of the underlying device, where the file lives on.]:files:_udevadm_mounts' \
445 '--export-db[Export the content of the udev database.]' \
446 '--cleanup-db[Cleanup the udev database.]'
447 }
448
449 _udevadm_trigger(){
450 _arguments \
451 '--verbose[Print the list of devices which will be triggered.]' \
452 '--dry-run[Do not actually trigger the event.]' \
453 '--type=[Trigger a specific type of devices.]:types:(devices subsystems failed)' \
454 '--action=[Type of event to be triggered.]:actions:(add change remove)' \
455 '--subsystem-match=[Trigger events for devices which belong to a matching subsystem.]' \
456 '--subsystem-nomatch=[Do not trigger events for devices which belong to a matching subsystem.]' \
457 '--attr-match=attribute=[Trigger events for devices with a matching sysfs attribute.]' \
458 '--attr-nomatch=attribute=[Do not trigger events for devices with a matching sysfs attribute.]' \
459 '--property-match=[Trigger events for devices with a matching property value.]' \
460 '--tag-match=property[Trigger events for devices with a matching tag.]' \
461 '--sysname-match=[Trigger events for devices with a matching sys device name.]' \
462 '--parent-match=[Trigger events for all children of a given device.]'
463 }
464
465 _udevadm_settle(){
466 _arguments \
467 '--timeout=[Maximum number of seconds to wait for the event queue to become empty.]' \
468 '--seq-start=[Wait only for events after the given sequence number.]' \
469 '--seq-end=[Wait only for events before the given sequence number.]' \
470 '--exit-if-exists=[Stop waiting if file exists.]:files:_files' \
471 '--quiet[Do not print any output, like the remaining queue entries when reaching the timeout.]' \
472 '--help[Print help text.]'
473 }
474
475 _udevadm_control(){
476 _arguments \
477 '--exit[Signal and wait for systemd-udevd to exit.]' \
478 '--log-priority=[Set the internal log level of systemd-udevd.]:priorities:(err info debug)' \
479 '--stop-exec-queue[Signal systemd-udevd to stop executing new events. Incoming events will be queued.]' \
480 '--start-exec-queue[Signal systemd-udevd to enable the execution of events.]' \
481 '--reload[Signal systemd-udevd to reload the rules files and other databases like the kernel module index.]' \
482 '--property=[Set a global property for all events.]' \
483 '--children-max=[Set the maximum number of events.]' \
484 '--timeout=[The maximum number of seconds to wait for a reply from systemd-udevd.]' \
485 '--help[Print help text.]'
486 }
487
488 _udevadm_monitor(){
489 _arguments \
490 '--kernel[Print the kernel uevents.]' \
491 '--udev[Print the udev event after the rule processing.]' \
492 '--property[Also print the properties of the event.]' \
493 '--subsystem-match=[Filter events by subsystem/\[devtype\].]' \
494 '--tag-match=[Filter events by property.]' \
495 '--help[Print help text.]'
496 }
497
498 _udevadm_test(){
499 _arguments \
500 '--action=[The action string.]:actions:(add change remove)' \
501 '--subsystem=[The subsystem string.]' \
502 '--help[Print help text.]' \
503 '*::devpath:_files -P /sys/ -W /sys'
504 }
505
506 _udevadm_test-builtin(){
507 if (( CURRENT == 2 )); then
508 _arguments \
509 '--help[Print help text]' \
510 '*::builtins:(blkid btrfs hwdb input_id kmod path_id usb_id uaccess)'
511 elif (( CURRENT == 3 )); then
512 _arguments \
513 '--help[Print help text]' \
514 '*::syspath:_files -P /sys -W /sys'
515 else
516 _arguments \
517 '--help[Print help text]'
518 fi
519 }
520
521 _udevadm_mounts(){
522 local dev_tmp dpath_tmp mp_tmp mline
523
524 tmp=( "${(@f)$(< /etc/mtab)}" )
525 dev_tmp=( "${(@)${(@)tmp%% *}:#none}" )
526 mp_tmp=( "${(@)${(@)tmp#* }%% *}" )
527
528 local MATCH
529 mp_tmp=("${(@q)mp_tmp//(#m)\\[0-7](#c3)/${(#)$(( 8#${MATCH[2,-1]} ))}}")
530 dpath_tmp=( "${(@Mq)dev_tmp:#/*}" )
531 dev_tmp=( "${(@q)dev_tmp:#/*}" )
532
533 _alternative \
534 'device-paths: device path:compadd -a dpath_tmp' \
535 'directories:mount point:compadd -a mp_tmp'
536 }
537
538
539 _udevadm_command(){
540 local -a _udevadm_cmds
541 _udevadm_cmds=(
542 'info:query sysfs or the udev database'
543 'trigger:request events from the kernel'
544 'settle:wait for the event queue to finish'
545 'control:control the udev daemon'
546 'monitor:listen to kernel and udev events'
547 'test:test an event run'
548 'test-builtin:test a built-in command'
549 )
550
551 if ((CURRENT == 1)); then
552 _describe -t commands 'udevadm commands' _udevadm_cmds
553 else
554 local curcontext="$curcontext"
555 cmd="${${_udevadm_cmds[(r)$words[1]:*]%%:*}}"
556 if (($#cmd)); then
557 if (( $+functions[_udevadm_$cmd] )); then
558 _udevadm_$cmd
559 else
560 _message "no options for $cmd"
561 fi
562 else
563 _message "no more options"
564 fi
565 fi
566 }
567
568 _ctls "$@"
569
570 #vim: set ft=zsh sw=4 ts=4 et