summary refs log tree commit diff
path: root/Completion/Zsh
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Zsh')
-rw-r--r--Completion/Zsh/Command/_zsocket14
1 files changed, 14 insertions, 0 deletions
diff --git a/Completion/Zsh/Command/_zsocket b/Completion/Zsh/Command/_zsocket
new file mode 100644
index 000000000..eeed9f1d8
--- /dev/null
+++ b/Completion/Zsh/Command/_zsocket
@@ -0,0 +1,14 @@
+#compdef zsocket
+
+_arguments -s -w -A "-*" \
+  '-v[verbose output]' \
+  '-d[target file descriptor]:fd:_file_descriptors' \
+  - outbound \
+  '1: :_files' \
+  - listen \
+  '-l[open a socket listening]' \
+  '1: :_files' \
+  - accept \
+  '-a[accept an incoming connection]' \
+  '-t[return if no incoming connections are pending]' \
+  '1:fd:{ (( words[(I)-*a*] )) && _file_descriptors }'