diff options
Diffstat (limited to 'bash-completion')
| -rw-r--r-- | bash-completion/Makemodule.am | 3 | ||||
| -rw-r--r-- | bash-completion/enosys | 33 |
2 files changed, 36 insertions, 0 deletions
diff --git a/bash-completion/Makemodule.am b/bash-completion/Makemodule.am index eb10f6f705..ac8926f2d0 100644 --- a/bash-completion/Makemodule.am +++ b/bash-completion/Makemodule.am @@ -344,5 +344,8 @@ endif if BUILD_WAITPID dist_bashcompletion_DATA += bash-completion/waitpid endif +if BUILD_ENOSYS +dist_bashcompletion_DATA += bash-completion/enosys +endif endif # BUILD_BASH_COMPLETION diff --git a/bash-completion/enosys b/bash-completion/enosys new file mode 100644 index 0000000000..4f63e6640a --- /dev/null +++ b/bash-completion/enosys @@ -0,0 +1,33 @@ +_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 |
