From e4fc3d574c836d5a8b2ddbb4660b96609f028252 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Wed, 12 Apr 2017 10:48:31 +0100 Subject: bash-completion: update term-utils 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 --- bash-completion/scriptreplay | 3 ++- bash-completion/setterm | 1 + bash-completion/write | 8 ++------ 3 files changed, 5 insertions(+), 7 deletions(-) (limited to 'bash-completion') diff --git a/bash-completion/scriptreplay b/bash-completion/scriptreplay index a4aa8a08d..9e1a79023 100644 --- a/bash-completion/scriptreplay +++ b/bash-completion/scriptreplay @@ -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) ) diff --git a/bash-completion/setterm b/bash-completion/setterm index dd46472de..25213dfd0 100644 --- a/bash-completion/setterm +++ b/bash-completion/setterm @@ -85,6 +85,7 @@ _setterm_module() esac OPTS=" --term --reset + --resize --initialize --cursor --repeat diff --git a/bash-completion/write b/bash-completion/write index 1fe080721..7b2d2fae3 100644 --- a/bash-completion/write +++ b/bash-completion/write @@ -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 -- cgit v1.2.3-55-g7522