aboutsummaryrefslogtreecommitdiff
path: root/2018-linuxdays/examples/zsh/switch
diff options
context:
space:
mode:
Diffstat (limited to '2018-linuxdays/examples/zsh/switch')
-rw-r--r--2018-linuxdays/examples/zsh/switch15
1 files changed, 15 insertions, 0 deletions
diff --git a/2018-linuxdays/examples/zsh/switch b/2018-linuxdays/examples/zsh/switch
new file mode 100644
index 0000000..09c9b29
--- /dev/null
+++ b/2018-linuxdays/examples/zsh/switch
@@ -0,0 +1,15 @@
+_sterm_baudrate() {
+ _values "Baudrate" "9600" "19200" "115200"
+}
+_sterm() {
+ _arguments \
+ "-s[Set baudrate]:baudrate:_sterm_baudrate" \
+ "-b[Send break]" \
+ "-c[Enter command mode]" \
+ "-d[Make pulse on DTR]" \
+ "-r[Make pulse on RTS]" \
+ "-e[Ignore '~.' escape sequence]" \
+ "-n[Do not switch the device to raw mode]" \
+ "-v[Verbose mode]"
+}
+compdef _sterm sterm