about summary refs log tree commit diff
path: root/Functions/Completion/__setopt
diff options
context:
space:
mode:
Diffstat (limited to 'Functions/Completion/__setopt')
-rw-r--r--Functions/Completion/__setopt7
1 files changed, 7 insertions, 0 deletions
diff --git a/Functions/Completion/__setopt b/Functions/Completion/__setopt
new file mode 100644
index 000000000..8a97befc7
--- /dev/null
+++ b/Functions/Completion/__setopt
@@ -0,0 +1,7 @@
+#function setopt
+
+local nm=$NMATCHES
+
+complist -M 'L:|[nN][oO]= M:_= M:{A-Z}={a-z}' \
+         -s '$({ unsetopt kshoptionprint; unsetopt } 2>/dev/null)'
+[[ -nmatches nm ]] && complist -M 'L:|[nN][oO]= M:_= M:{A-Z}={a-z}' -o