summaryrefslogtreecommitdiff
path: root/man/mu-script.1
blob: ec3f0324743dbea6f6154086bf7ad499b3f890ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
.TH MU SCRIPT 1 "October 2021" "User Manuals"

.SH NAME

mu script\- show the available mu scripts, and/or run them.

.SH SYNOPSIS

.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.
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 (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\-\-verbose\fR,\fB\-v\fR
when listing the available scripts, show the long descriptions.

\fB\-\-\fR
all options on the right side of the \fB\-\-\fR are passed to the script.

.SH EXAMPLES

List all available scripts (one-line descriptions):
.nf
  $ mu script
.fi

List all available scripts matching \fImonth\fR (long descriptions):
.nf
  $ mu script -v month
.fi

Run the \fImsgs-per-month\fR script for messages matching 'hello', and pass it
the \fI--textonly\fR parameter:
.nf
  $ mu msgs-per-month --query=hello --textonly
.fi

.SH RETURN VALUE

\fBmu script\fR returns 0 when all went well, and returns some non-zero error
code when this is not the case.

.SH FILES

You can make your own Scheme scripts accessible through \fBmu script\fR by
putting them in either \fI<XDG_DATA_HOME>/mu/scripts\fR (e.g., \fI~/.local/share/mu/scripts\fR) or, if \fImuhome\fR is specified, in 

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)
;; INFO: --option1=<foo> (describe option1)
;; INFO: etc.
.fi

.SH BUGS

Please report bugs if you find them:
.BR https://github.com/djcb/mu/issues

.SH AUTHOR

Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>

.SH "SEE ALSO"

.BR mu (1),
.BR guile (1)