Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
if BUILD_WAITPID
dist_bashcompletion_DATA += bash-completion/waitpid
endif
+if BUILD_ENOSYS
+dist_bashcompletion_DATA += bash-completion/enosys
+endif
endif # BUILD_BASH_COMPLETION
--- /dev/null
+_waitpid_module()
+{
+ local cur prev OPTS
+ COMPREPLY=()
+ cur="${COMP_WORDS[COMP_CWORD]}"
+ prev="${COMP_WORDS[COMP_CWORD-1]}"
+ case $prev in
+ '-s'|'--syscall')
+ return 0
+ ;;
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
+ esac
+ case $cur in
+ -*)
+ OPTS="--syscall
+ --help
+ --version"
+ COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
+ return 0
+ ;;
+ *)
+ _pids
+ return 0
+ ;;
+ esac
+ local IFS=$'\n'
+ compopt -o filenames
+ COMPREPLY=( $(compgen -u -- $cur) )
+ return 0
+}
+complete -F _enosys_module enosys
install : true)
if not is_disabler(exe)
exes += exe
+ bashcompletions += ['enosys']
endif
############################################################