diff options
author | Arun Isaac | 2024-05-30 02:42:40 +0100 |
---|---|---|
committer | Arun Isaac | 2024-05-30 02:42:40 +0100 |
commit | 2a5b73121ce7ce4c4bd5f3f482187dd22489e330 (patch) | |
tree | af89e0036102c50f2c8508e0b948a72e5a5dbe67 /doc | |
parent | 40db32d3c36b4e304b9c8e39ae7f252aef5522d7 (diff) | |
download | ccwl-2a5b73121ce7ce4c4bd5f3f482187dd22489e330.tar.gz ccwl-2a5b73121ce7ce4c4bd5f3f482187dd22489e330.tar.lz ccwl-2a5b73121ce7ce4c4bd5f3f482187dd22489e330.zip |
doc: Document prefixing arguments.
* doc/ccwl.skb (Cookbook)[Prefix arguments]: New section.
* doc/prefix-arguments.scm: New file.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ccwl.skb | 7 | ||||
-rw-r--r-- | doc/prefix-arguments.scm | 5 |
2 files changed, 12 insertions, 0 deletions
diff --git a/doc/ccwl.skb b/doc/ccwl.skb index 700406d..cc4c339 100644 --- a/doc/ccwl.skb +++ b/doc/ccwl.skb @@ -356,6 +356,13 @@ accept). Here are a couple of examples passing in an ,(code respectively.] (scheme-source "doc/inline-javascript-requirement.scm") (scheme-source "doc/resource-requirement.scm"))) + (section :title [Prefix arguments] + :ident "prefix-arguments" + (p [You want to be able to associate arguments of a command to a +prefix. For example, in the following example, we associate the input +,(code "output_filename") to the prefix ,(code "-o"). Notice the +parentheses around ,(code "-o output_filename").] + (scheme-source "doc/prefix-arguments.scm"))) (section :title [Array types] :ident "section-array-types" (p [ccwl supports array types using the following syntax.] diff --git a/doc/prefix-arguments.scm b/doc/prefix-arguments.scm new file mode 100644 index 0000000..ec95aeb --- /dev/null +++ b/doc/prefix-arguments.scm @@ -0,0 +1,5 @@ +(command #:inputs (source #:type File) (output_filename #:type string) + #:run "gcc" source ("-o" output_filename) + #:outputs (executable + #:type File + #:binding ((glob . "$(inputs.output_filename)")))) |