summaryrefslogtreecommitdiff
path: root/Completion/Unix/Command/_mknod
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2018-12-24 04:40:22 +0100
committerAxel Beckert <abe@deuxchevaux.org>2018-12-24 04:40:22 +0100
commitbf8b7f713a5b04a191f4596fb86bbbfca0a855ce (patch)
treeb647a8dc990c8c845b8a8eca7bf92fbbf17e1fb5 /Completion/Unix/Command/_mknod
parent06946d431a4426c6e5dffec1d7edb17c1dbd467c (diff)
parent9dbde9e9c7d22ee0d301e4a2fecf97906d1ddce9 (diff)
downloadzsh-bf8b7f713a5b04a191f4596fb86bbbfca0a855ce.tar.gz
zsh-bf8b7f713a5b04a191f4596fb86bbbfca0a855ce.zip
New upstream release candidate 5.6.2-test-2
Merge branch 'upstream' at 'zsh-5.6.2-test-2' into branch debian
Diffstat (limited to 'Completion/Unix/Command/_mknod')
-rw-r--r--Completion/Unix/Command/_mknod45
1 files changed, 45 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_mknod b/Completion/Unix/Command/_mknod
new file mode 100644
index 000000000..902f49b9f
--- /dev/null
+++ b/Completion/Unix/Command/_mknod
@@ -0,0 +1,45 @@
+#compdef mknod gmknod
+
+# - @todo Major/minor device numbers could be completed using /proc/devices on
+# Linux and e.g. `stat -f %Hr /dev/*` on BSD/Darwin
+# - @todo Device numbers should not be completed given p or w types
+
+local -a aopts args
+
+if _pick_variant gnu='Free Soft' $OSTYPE --version; then
+ args=(
+ '(: * -)--help[display help information]'
+ '(: * -)--version[display version information]'
+ '(-m --mode)'{-m+,--mode=}'[specify file mode]: :_file_modes'
+ '1:special file:_files'
+ '2:special file type:((
+ b\:"block (buffered) special file"
+ {c,u}\:"character (unbuffered) special file"
+ p\:FIFO
+ ))'
+ '3:major device number'
+ '4:minor device number'
+ )
+ [[ $OSTYPE == linux* ]] && args+=(
+ '(--context)-Z[set SELinux security context to default]'
+ '(-Z)--context=-[like -Z, or specify SELinux security context]:SELinux security context'
+ )
+else
+ aopts=( -A '-*' )
+ args=(
+ '-F+[specify device-number format]:device-number format:(
+ native 386bsd 4bsd bsdos freebsd hpux isc linux netbsd osf1 sco solaris
+ sunos svr3 svr4 ultrix
+ )'
+ '1:special file:_files'
+ '2:special file type:((
+ b\:"block-type device"
+ c\:"character-type device"
+ w\:"whiteout node"
+ ))'
+ '3:major device number'
+ '4:minor device number'
+ )
+fi
+
+_arguments -s -S $aopts : $args