bash-completion: update for new script tools
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
eb78192211
commit
0faa7eda04
|
@ -90,6 +90,9 @@ endif
|
|||
if BUILD_SCRIPTREPLAY
|
||||
dist_bashcompletion_DATA += bash-completion/scriptreplay
|
||||
endif
|
||||
if BUILD_SCRIPTLIVE
|
||||
dist_bashcompletion_DATA += bash-completion/scriptlive
|
||||
endif
|
||||
if BUILD_SETSID
|
||||
dist_bashcompletion_DATA += bash-completion/setsid
|
||||
endif
|
||||
|
|
|
@ -25,6 +25,12 @@ _script_module()
|
|||
-*)
|
||||
OPTS="--append
|
||||
--command
|
||||
--echo
|
||||
--log-in
|
||||
--log-out
|
||||
--log-io
|
||||
--log-timing
|
||||
--logging-format
|
||||
--return
|
||||
--flush
|
||||
--force
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
_scriptlive_module()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-d'|'--divisor'|'-m'|'--maxdelay')
|
||||
COMPREPLY=( $(compgen -W "digit" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-h'|'--help'|'-V'|'--version')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS="--timing
|
||||
--log-in
|
||||
--log-io
|
||||
--log-timing
|
||||
--command
|
||||
--divisor
|
||||
--maxdelay
|
||||
--version
|
||||
--help"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
local IFS=$'\n'
|
||||
compopt -o filenames
|
||||
COMPREPLY=( $(compgen -f -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _scriptlive_module scriptlive
|
|
@ -16,6 +16,13 @@ _scriptreplay_module()
|
|||
case $cur in
|
||||
-*)
|
||||
OPTS="--timing
|
||||
--log-in
|
||||
--log-out
|
||||
--log-io
|
||||
--log-timing
|
||||
--summary
|
||||
--stream
|
||||
--cr-mode
|
||||
--typescript
|
||||
--divisor
|
||||
--maxdelay
|
||||
|
|
Loading…
Reference in New Issue