From 4f48ce208b89b0790f113642aab200a65abf7816 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Fri, 27 Sep 2019 00:27:45 +0200 Subject: 44781: add completion of SELinux contexts --- Completion/Linux/Type/_selinux_contexts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Completion/Linux/Type/_selinux_contexts (limited to 'Completion/Linux/Type/_selinux_contexts') diff --git a/Completion/Linux/Type/_selinux_contexts b/Completion/Linux/Type/_selinux_contexts new file mode 100644 index 000000000..4c2cf4288 --- /dev/null +++ b/Completion/Linux/Type/_selinux_contexts @@ -0,0 +1,14 @@ +#autoload + +local -a parts suf + +parts=( users roles types ) +while compset -P 1 '*:' && (( $+parts[1] )) ; do + shift parts +done +if (( $+parts[1] )); then + compset -S ':*' || suf=( -S : ) + _selinux_$parts[1] $suf +else + _message -e selinux-ranges 'selinux range' +fi -- cgit 1.4.1