diff options
author | Karel Kočí <cynerd@email.cz> | 2018-10-07 20:03:35 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2018-10-07 20:03:35 +0200 |
commit | 7cf03a1555d46117b5f1a3d0db7c28c02498fcee (patch) | |
tree | e7ded2835880ad350fad3209ce667f469858cfed /2018-linuxdays/examples/bash/real | |
parent | 8958b564509b4a4a63004763d70457d3ff5e5392 (diff) | |
download | presentations-7cf03a1555d46117b5f1a3d0db7c28c02498fcee.tar.gz presentations-7cf03a1555d46117b5f1a3d0db7c28c02498fcee.tar.bz2 presentations-7cf03a1555d46117b5f1a3d0db7c28c02498fcee.zip |
Add presentation from LinuxDays 2018
Diffstat (limited to '2018-linuxdays/examples/bash/real')
-rw-r--r-- | 2018-linuxdays/examples/bash/real | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/2018-linuxdays/examples/bash/real b/2018-linuxdays/examples/bash/real new file mode 100644 index 0000000..2dd3f36 --- /dev/null +++ b/2018-linuxdays/examples/bash/real @@ -0,0 +1,23 @@ +# Bash completion file for sterm +# vim: ft=sh + +_sterm() { + local cur prev words cword + _init_completion || return + local ops="-h --help -c -d -e -n -r -s -v" + case "$prev" in + -b|-d|-r) + # No completion for these + ;; + -s) + local speeds="0 50 75 110 134 150 200 300 600 1200 1800 2400 4800 9600 19200 38400 57600 115200 230400" + COMPREPLY+=($(compgen -W "${speeds}" -- ${cur})) + ;; + *) + COMPREPLY+=($(compgen -W "${ops}" -- ${cur})) + COMPREPLY+=($(compgen -G "/dev/tty*" -- ${cur})) + ;; + esac +} + +complete -o default -F _sterm sterm |