diff options
author | Oliver Kiddle <okiddle@yahoo.co.uk> | 2019-09-27 00:27:45 +0200 |
---|---|---|
committer | Oliver Kiddle <okiddle@yahoo.co.uk> | 2019-09-27 00:27:45 +0200 |
commit | 4f48ce208b89b0790f113642aab200a65abf7816 (patch) | |
tree | 077ab574515a61bc05c3e7f38a7493678f52a1f3 /Completion/Linux/Type/_selinux_contexts | |
parent | 81be5d1dceae907052858d3c2140a109d5c3f553 (diff) | |
download | zsh-4f48ce208b89b0790f113642aab200a65abf7816.tar.gz zsh-4f48ce208b89b0790f113642aab200a65abf7816.tar.xz zsh-4f48ce208b89b0790f113642aab200a65abf7816.zip |
44781: add completion of SELinux contexts
Diffstat (limited to 'Completion/Linux/Type/_selinux_contexts')
-rw-r--r-- | Completion/Linux/Type/_selinux_contexts | 14 |
1 files changed, 14 insertions, 0 deletions
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 |