aboutsummaryrefslogtreecommitdiff
path: root/2018-linuxdays/examples/zsh/real
blob: 7b2dce61984e60244950fbdd78a9f05e65ddc76b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# vim: ft=zsh
_sterm_baudrate() {
	_values "Baudrate" \
		"0" \
		"50" \
		"75" \
		"110" \
		"134" \
		"150" \
		"200" \
		"300" \
		"600" \
		"1200" \
		"1800" \
		"2400" \
		"4800" \
		"9600" \
		"19200" \
		"38400" \
		"57600" \
		"115200" \
		"230400"
}
_sterm() {
	_arguments \
		"--help[Output help message]" \
		"-h[Print help text]" \
		"-s[Set baudrate]:baudrate:_sterm_baudrate" \
		"-b[Send break]:break:->ignore" \
		"-c[Enter command mode]" \
		"-d[Make pulse on DTR]:pulse:->ignore" \
		"-r[Make pulse on RTS]:pulse:->ignore" \
		"-e[Ignore '~.' escape sequence]" \
		"-n[Do not switch the device to raw mode]" \
		"-v[Verbose mode]"
	[ "$state" = "ignore" ] || _values "tty" /dev/tty*
}
compdef _sterm sterm