aboutsummaryrefslogtreecommitdiff
path: root/2018-linuxdays/examples/zsh/real
diff options
context:
space:
mode:
Diffstat (limited to '2018-linuxdays/examples/zsh/real')
-rw-r--r--2018-linuxdays/examples/zsh/real38
1 files changed, 38 insertions, 0 deletions
diff --git a/2018-linuxdays/examples/zsh/real b/2018-linuxdays/examples/zsh/real
new file mode 100644
index 0000000..7b2dce6
--- /dev/null
+++ b/2018-linuxdays/examples/zsh/real
@@ -0,0 +1,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