]> rtime.felk.cvut.cz Git - sojka/sterm.git/blobdiff - completion.zsh
Add --help and --version command line switches
[sojka/sterm.git] / completion.zsh
index b803ab95edfea8df80c97a951cdb048a3a5e8016..e4dabecbb36e4fa9fc61ba935f4d9729a824cbdd 100644 (file)
@@ -6,11 +6,13 @@ _sterm_defs() {
                "--help[Output help message]" \
                "-h[Print help text]" \
                "-s[Set 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]" \
+               "-n[Do not switch stdin to raw mode]" \
+               "-t[Delay \[ms\] between transmitted characters]" \
                "-v[Verbose mode]"
        _path_files
 }
@@ -19,7 +21,7 @@ _sterm() {
        if (( CURRENT > 2)); then
                local prev=${words[(( CURRENT - 1))]}
                case "${prev}" in
-                       -d|-r)
+                       -b|-d|-r|-t)
                                # No completion for these
                                ;;
                        -s)
@@ -42,7 +44,19 @@ _sterm() {
                                        "38400" \
                                        "57600" \
                                        "115200" \
-                                       "230400"
+                                       "230400" \
+                                       "460800" \
+                                       "500000" \
+                                       "576000" \
+                                       "921600" \
+                                       "1000000" \
+                                       "1152000" \
+                                       "1500000" \
+                                       "2000000" \
+                                       "2500000" \
+                                       "3000000" \
+                                       "3500000" \
+                                       "4000000"
                                ;;
                        *)
                                _sterm_defs