* guile: make running guile scripts a bit more convenient, document it
For example, you can now run a script like:
$ mu msgs-per-month --textonly --query=hello
This commit is contained in:
@ -1,32 +1,31 @@
|
||||
.TH MU SCRIPT 1 "March 2013" "User Manuals"
|
||||
.TH MU SCRIPT 1 "June 2013" "User Manuals"
|
||||
|
||||
.SH NAME
|
||||
|
||||
mu script\- run a mu script
|
||||
mu script\- show the available mu scripts, and run them.
|
||||
|
||||
.SH SYNOPSIS
|
||||
|
||||
.B mu script [options] [--script=<script>] [<pattern>] [-- [script-options]]
|
||||
.B mu script [options] [<pattern>]
|
||||
|
||||
.B mu <script-name> [<script-options>]
|
||||
|
||||
.SH DESCRIPTION
|
||||
|
||||
\fBmu script\fR is the \fBmu\fR command to list available \fBmu\fR scripts,
|
||||
and run them. The scripts are implemented in the Guile programming language,
|
||||
and thus only work if your \fBmu\fR is built with support for Guile. In
|
||||
\fBmu script\fR is the \fBmu\fR command to list available \fBmu\fR scripts.
|
||||
The scripts are to be implemented in the Guile programming language, and
|
||||
therefore only work if your \fBmu\fR is built with support for Guile. In
|
||||
addition, many scripts require you to have \fBgnuplot\fR installed.
|
||||
|
||||
Without any parameters, \fBmu script\fR lists the available scripts. If you
|
||||
provide a pattern (regular expression), only the scripts whose name or
|
||||
one-line description match this pattern, are listed. See the examples below.
|
||||
provide a pattern (a regular expression), only the scripts whose name or
|
||||
one-line description match this pattern are listed. See the examples below.
|
||||
|
||||
\fBmu\fR ships with a number of scripts.
|
||||
|
||||
.SH OPTIONS
|
||||
|
||||
.TP
|
||||
\fB\-\-script=\fR\fI<script>\fR
|
||||
run the given script.
|
||||
|
||||
\fB\-\-verbose\fR,\fB\-v\fR
|
||||
when listing the available scripts, show the long descriptions.
|
||||
|
||||
@ -45,10 +44,10 @@ List all available scripts matching \fImonth\fR (long descriptions):
|
||||
$ mu script -v month
|
||||
.fi
|
||||
|
||||
Run the \fImsgs-per-month\fR script, and pass it the \fI--textonly\fR
|
||||
parameter:
|
||||
Run the \fImsgs-per-month\fR script for messages matching 'hello', and pass it
|
||||
the \fI--textonly\fR parameter:
|
||||
.nf
|
||||
$ mu script --script=msgs-per-month -- --textonly
|
||||
$ mu msgs-per-month --query=hello --textonly
|
||||
.fi
|
||||
|
||||
.SH RETURN VALUE
|
||||
@ -60,8 +59,8 @@ code when this is not the case.
|
||||
|
||||
You can make your own Scheme scripts accessible through \fBmu script\fR by
|
||||
putting them in \fI<muhome>/scripts\fR (which is typically
|
||||
\fI~/.mu/scripts\fR). It is a good idea to document it using some special
|
||||
comments in the source code:
|
||||
\fI~/.mu/scripts\fR). It is a good idea to document the scripts by using some
|
||||
special comments in the source code:
|
||||
.nf
|
||||
;; INFO: this is my script -- one-line description
|
||||
;; INFO: (longer description)
|
||||
|
||||
Reference in New Issue
Block a user