summaryrefslogtreecommitdiffstats
path: root/completions/checksec
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:03:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:03:18 +0000
commitf4acb49ea148cdd899f7f29f1591c7bc853c2135 (patch)
treeb62d60873864065d6428a84a119dd8a3c90f1397 /completions/checksec
parentAdding upstream version 1:2.11. (diff)
downloadbash-completion-f4acb49ea148cdd899f7f29f1591c7bc853c2135.tar.xz
bash-completion-f4acb49ea148cdd899f7f29f1591c7bc853c2135.zip
Adding upstream version 1:2.12.0.upstream/1%2.12.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'completions/checksec')
-rw-r--r--completions/checksec29
1 files changed, 20 insertions, 9 deletions
diff --git a/completions/checksec b/completions/checksec
index fc2fef7..95e2dce 100644
--- a/completions/checksec
+++ b/completions/checksec
@@ -1,37 +1,48 @@
# bash completion for checksec -*- shell-script -*-
-_checksec()
+_comp_cmd_checksec()
{
- local cur prev words cword
- _init_completion || return
+ local cur prev words cword was_split comp_args
+ _comp_initialize -s -- "$@" || return
case $prev in
--version | --help)
return
;;
--file | --fortify-file)
- _filedir
+ _comp_compgen_filedir
return
;;
--dir)
- _filedir -d
+ _comp_compgen_filedir -d
return
;;
--proc)
- _pnames
+ _comp_compgen_pnames
return
;;
--proc-libs | --fortify-proc)
- _pids
+ _comp_compgen_pids
return
;;
+ --format)
+ _comp_compgen_split -- "$("$1" --help 2>/dev/null |
+ command sed -ne 's/[{,}]/ /g;s/^[[:space:]]*--format=//p')"
+ ;;
+ --output)
+ _comp_compgen_split -- "$("$1" --help 2>/dev/null |
+ command sed -ne 's/[{,}]/ /g;s/^[[:space:]]*--output=//p')"
+ ;;
esac
+ [[ $was_split ]] && return
+
if [[ $cur == -* ]]; then
- COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
+ _comp_compgen_help
+ [[ ${COMPREPLY-} == *= ]] && compopt -o nospace
return
fi
} &&
- complete -F _checksec checksec
+ complete -F _comp_cmd_checksec checksec
# ex: filetype=sh