# bash completion for checksec -*- shell-script -*- proc _checksec { var cur = '', prev = '', words = '', cword = '' _init_completion || return match $prev { with --version|--help return with --file|--fortify-file _filedir return with --dir _filedir -d return with --proc _pnames return with --proc-libs|--fortify-proc _pids return } if [[ $cur == -* ]] { setglobal COMPREPLY = '( '$( compgen -W '$( _parse_help "$1" )' -- "$cur" ) ) return } } && complete -F _checksec checksec # ex: ts=4 sw=4 et filetype=sh