documents/ros-init.md --- updated the sample

This commit is contained in:
Masataro Asai 2016-03-12 23:19:42 +09:00
parent 0a48edc8e3
commit 5e5cc1ebc4
3 changed files with 21 additions and 9 deletions

View file

@ -33,11 +33,15 @@
<p>The default template is something like:</p>
<pre><code>#!/bin/sh
#|-*- mode:lisp -*-|#
#|
#| &lt;Put a one-line description here&gt;
exec ros -Q -- $0 &quot;$@&quot;
|#
(defpackage :ros.script.test.3666781082
(:use :cl))
(in-package :ros.script.test.3666781082)
(defun main (&amp;rest argv)
(declare (ignorable argv)))</code></pre>
(declare (ignorable argv)))
;;; vim: set ft=lisp lisp:</code></pre>
<p>This is basically a shell script which immediately invokes Roswell by exec (see <em>sh(1)</em>). Roswell loads the same script as an input, skips multi-line comments, reads the rest of the file as a Common Lisp program, and finally invokes a function main with command-line arguments.</p>
<!-- # options -->
<!-- -->

View file

@ -1,7 +1,7 @@
.TH "ros-init" "1" "" "" ""
.nh \" Turn off hyphenation by default.
.PP
ros-init - Create a roswell script (optionally based on a template)
ros\-init \- Create a roswell script (optionally based on a template)
.SH Synopsis
.PP
\f[B]ros init [template]\f[] name
@ -19,20 +19,24 @@ The default template is something like:
.nf
\f[C]
#!/bin/sh
#|-*-\ mode:lisp\ -*-|#
#|
exec\ ros\ -Q\ --\ $0\ "$\@"
#|\-*\-\ mode:lisp\ \-*\-|#
#|\ <Put\ a\ one\-line\ description\ here>
exec\ ros\ \-Q\ \-\-\ $0\ "$\@"
|#
(defpackage\ :ros.script.test.3666781082
\ \ (:use\ :cl))
(in\-package\ :ros.script.test.3666781082)
(defun\ main\ (&rest\ argv)
\ \ (declare\ (ignorable\ argv)))
;;;\ vim:\ set\ ft=lisp\ lisp:
\f[]
.fi
.PP
This is basically a shell script which immediately invokes Roswell by
exec (see \f[I]sh(1)\f[]).
Roswell loads the same script as an input, skips multi-line comments,
Roswell loads the same script as an input, skips multi\-line comments,
reads the rest of the file as a Common Lisp program, and finally invokes
a function main with command-line arguments.
a function main with command\-line arguments.
.SH SEE ALSO
.PP
\f[I]sbcl\f[](1) \f[I]ros\f[](1)

View file

@ -19,11 +19,15 @@ The default template is something like:
```
#!/bin/sh
#|-*- mode:lisp -*-|#
#|
#| <Put a one-line description here>
exec ros -Q -- $0 "$@"
|#
(defpackage :ros.script.test.3666781082
(:use :cl))
(in-package :ros.script.test.3666781082)
(defun main (&rest argv)
(declare (ignorable argv)))
;;; vim: set ft=lisp lisp:
```
This is basically a shell script which immediately invokes Roswell by exec (see _sh(1)_). Roswell loads the same script as an input, skips multi-line comments, reads the rest of the file as a Common Lisp program, and finally invokes a function main with command-line arguments.