Signed-off-by: Sami Kerola <kerolasa@iki.fi>
if BUILD_IPCS
dist_bashcompletion_DATA += bash-completion/ipcs
endif
+if BUILD_IRQTOP
+dist_bashcompletion_DATA += bash-completion/irqtop
+endif
if BUILD_ISOSIZE
dist_bashcompletion_DATA += bash-completion/isosize
endif
--- /dev/null
+_irqtop_module()
+{
+ local cur prev OPTS
+ COMPREPLY=()
+ cur="${COMP_WORDS[COMP_CWORD]}"
+ prev="${COMP_WORDS[COMP_CWORD-1]}"
+ case $prev in
+ '-d'|'--delay')
+ COMPREPLY=( $(compgen -W "secs" -- $cur) )
+ return 0
+ ;;
+ '-s'|'--sort')
+ COMPREPLY=( $(compgen -W "c i n" -- $cur) )
+ return 0
+ ;;
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
+ esac
+ OPTS=" --delay
+ --once
+ --sort
+ --help
+ --version"
+ COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
+ return 0
+}
+complete -F _irqtop_module irqtop