From 1b251a08f8c10ff292d1ca9b1c580e88df483b94 Mon Sep 17 00:00:00 2001 From: johannst Date: Mon, 26 Jun 2023 19:23:26 +0000 Subject: deploy: e730452fd8bd6824d35f25f2e87b8ec788b626fd --- print.html | 29 +++++++++++++++++++++++++++-- searchindex.js | 2 +- searchindex.json | 2 +- tools/gdb.html | 6 ++++++ tools/zsh.html | 23 +++++++++++++++++++++-- 5 files changed, 56 insertions(+), 6 deletions(-) diff --git a/print.html b/print.html index 219f8c0..3af14e1 100644 --- a/print.html +++ b/print.html @@ -399,8 +399,8 @@ blu -- desc for blu

where SPEC can have one of the following forms:

Available actions

(op1 op2)   list possible matches
@@ -437,6 +437,25 @@ function _foo() {
     esac
 }
 
+

Example with optional arguments

+

For this example we assume that the command foo takes at least three optional +arguments such as

+
foo arg1 arg2 arg3 [argN..]
+
+
function _foo() {
+    _arguments              \
+        "1:opt 1:(a b c)"   \
+        ":opt next:(d e f)" \
+        "*:opt all:(u v w)"
+}
+
+

Explanation:

+

_files is a zsh builtin utility function to complete files/dirs see