]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
bash-completion: update term-utils
authorSami Kerola <kerolasa@iki.fi>
Wed, 12 Apr 2017 09:48:31 +0000 (10:48 +0100)
committerSami Kerola <kerolasa@iki.fi>
Mon, 17 Apr 2017 17:34:14 +0000 (18:34 +0100)
scriptreplay:

Add --maxdelay option.

Commit: 7f1d48363823f7da47ca56f84eb4b2155c5ed36b

setterm:

Add --resize coption.

Commit: 5d795999511adc455d223be8281948796bd7d087

write:

List only users who are online and determine tty based on given user
name.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
bash-completion/scriptreplay
bash-completion/setterm
bash-completion/write

index a4aa8a08d2e963c8df391b50723d1f02501f52d5..9e1a790230f1af601d64ffa86d14c0a6ec64a0a1 100644 (file)
@@ -5,7 +5,7 @@ _scriptreplay_module()
        cur="${COMP_WORDS[COMP_CWORD]}"
        prev="${COMP_WORDS[COMP_CWORD-1]}"
        case $prev in
-               '-d'|'--divisor')
+               '-d'|'--divisor'|'-m'|'--maxdelay')
                        COMPREPLY=( $(compgen -W "digit" -- $cur) )
                        return 0
                        ;;
@@ -18,6 +18,7 @@ _scriptreplay_module()
                        OPTS="--timing
                                --typescript
                                --divisor
+                               --maxdelay
                                --version
                                --help"
                        COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
index dd46472de7fe16c27c17e070c10080e6c83df337..25213dfd09d4f949c575151d9fbe588f83b033d0 100644 (file)
@@ -85,6 +85,7 @@ _setterm_module()
        esac
        OPTS="  --term
                --reset
+               --resize
                --initialize
                --cursor
                --repeat
index 1fe0807214e48ebbdd7f44bc371856e1cfb5564d..7b2d2fae3f352123e4b806d30121d5c36fb1a24f 100644 (file)
@@ -11,15 +11,11 @@ _write_module()
        esac
        case $COMP_CWORD in
                1)
-                       COMPREPLY=( $(compgen -u -- $cur) )
+                       COMPREPLY=( $(compgen -W '$(users)' -- $cur) )
                        return 0
                        ;;
                2)
-                       local I TERMS=''
-                       for I in /sys/class/tty/*; do
-                               TERMS+="/dev${I##/sys/class/tty} "
-                       done
-                       COMPREPLY=( $(compgen -W "$TERMS" -- $cur) )
+                       COMPREPLY=( $(compgen -W "$(w -h $prev | awk '{print $2}')" -- $cur) )
                        return 0
                        ;;
        esac