about summary refs log tree commit diff
path: root/Completion/Unix/Command
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2023-11-17 18:25:21 +0100
committerOliver Kiddle <opk@zsh.org>2023-11-17 18:25:21 +0100
commit8f0a8131fad30c627d72f24a6a88ac0053cd3790 (patch)
treeb9442700fafcf8ffad122998ff6137c0bb5a8f75 /Completion/Unix/Command
parent6306dcfaa52237fbaa76eafe7bc396e68eda66ca (diff)
downloadzsh-8f0a8131fad30c627d72f24a6a88ac0053cd3790.tar.gz
zsh-8f0a8131fad30c627d72f24a6a88ac0053cd3790.tar.xz
zsh-8f0a8131fad30c627d72f24a6a88ac0053cd3790.zip
52307: new completion for many SELinux tools
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r--Completion/Unix/Command/_cp2
-rw-r--r--Completion/Unix/Command/_find4
-rw-r--r--Completion/Unix/Command/_install2
-rw-r--r--Completion/Unix/Command/_mount6
-rw-r--r--Completion/Unix/Command/_zfs2
5 files changed, 8 insertions, 8 deletions
diff --git a/Completion/Unix/Command/_cp b/Completion/Unix/Command/_cp
index da9428ce3..cb899cc28 100644
--- a/Completion/Unix/Command/_cp
+++ b/Completion/Unix/Command/_cp
@@ -32,7 +32,7 @@ if _pick_variant gnu=GNU unix --version; then
     '(-v --verbose)'{-v,--verbose}'[explain what is being done]' \
     '(-x --one-file-system)'{-x,--one-file-system}'[stay on this file system]' \
     '(--context)-Z[set destination SELinux security context]' \
-    '(-Z)--context=-[set destination SELinux security context]:: :_selinux_contexts' \
+    '(-Z)--context=-[set destination SELinux security context]:: :_selinux_contexts -a file_type' \
     '(- *)--help' '(- *)--version' \
     '*:file or directory:_files'
 else
diff --git a/Completion/Unix/Command/_find b/Completion/Unix/Command/_find
index 560b77f7e..4f1c338ee 100644
--- a/Completion/Unix/Command/_find
+++ b/Completion/Unix/Command/_find
@@ -115,14 +115,14 @@ case $variant in
       '*-readable'
       '*-writable'
       '*-xtype:file type:((b\:block\ special\ file c\:character\ special\ file d\:directory p\:named\ pipe f\:normal\ file l\:symbolic\ link s\:socket))'
-      '-files0-from[start recursing from targets in given file]:NUL-separated targets file:_files'
+      '(*)-files0-from[start recursing from targets in given file]:NUL-separated targets file:_files'
       '*-fls:output file:_files'
       '*-fprint:output file:_files'
       '*-fprint0:output file:_files'
       '*-fprintf:output file:_files:output format'
       '*-printf:output format'
     )
-    [[ $OSTYPE = linux-gnu ]] && args+=( '*-context:SELinux context (glob pattern):_selinux_contexts' )
+    [[ $OSTYPE = linux-gnu ]] && args+=( '*-context:SELinux context (glob pattern):_selinux_contexts -a file_type' )
   ;;
 esac
 
diff --git a/Completion/Unix/Command/_install b/Completion/Unix/Command/_install
index 364119961..238b8b5bc 100644
--- a/Completion/Unix/Command/_install
+++ b/Completion/Unix/Command/_install
@@ -25,7 +25,7 @@ if _pick_variant gnu='Free Soft' unix --version; then
   args+=(
     $common_args
     '(-b --backup)--backup=[create backup; optionally specify method]:: :->controls'
-    "${lx}--context=-[like -Z, or specify SELinux security context to set]::SELinux security context:_selinux_contexts"
+    "${lx}--context=-[like -Z, or specify SELinux security context to set]::SELinux security context:_selinux_contexts -a file_type"
     '-D[create all leading destination path components]'
     '(: -)--help[display help information]'
     "${lx}--preserve-context[preserve SELinux security context]"
diff --git a/Completion/Unix/Command/_mount b/Completion/Unix/Command/_mount
index 5a379b424..bf75aa118 100644
--- a/Completion/Unix/Command/_mount
+++ b/Completion/Unix/Command/_mount
@@ -334,9 +334,9 @@ if (( ! $+_fs_any )); then
       'keybits[set number of bits in encryption key]:key size:(64 128 160 192 256)'
       'offset[specify data start for loopback mount]:offset (bytes)'
       '(loud)silent' '(silent)loud'
-      '(fscontext defcontext)context:context'
-      '(context)'{fscontext,defcontext}':context'
-      'rootcontext:context'
+      '(fscontext defcontext)context:context:_selinux_contexts -a file_type'
+      '(context)'{fscontext,defcontext}':context:_selinux_contexts -a file_type'
+      'rootcontext:context:_selinux_contexts -a file_type'
     )
     _fs_adfs=(
       'uid[set owner of root]:user ID'
diff --git a/Completion/Unix/Command/_zfs b/Completion/Unix/Command/_zfs
index 3265e1eb8..c09435a1f 100644
--- a/Completion/Unix/Command/_zfs
+++ b/Completion/Unix/Command/_zfs
@@ -295,7 +295,7 @@ case $OSTYPE in
   linux-gnu)
     rw_ds_props+=( 'relatime:value:(on off)' )
     ci_ds_props+=(
-      {,fs,def,root}'context:SELinux context:_selinux_contexts'
+      {,fs,def,root}'context:SELinux context:_selinux_contexts -a file_type'
     )
   ;;
 esac