Added EXAMPLES section

This commit is contained in:
Jeremy Baxter 2022-08-02 16:26:20 +12:00
parent 1a2229add2
commit 0daa8367ec
2 changed files with 23 additions and 8 deletions

View file

@ -10,7 +10,7 @@
.Op Fl t Ar type .Op Fl t Ar type
.Op Fl c .Op Fl c
.Op Fl h .Op Fl h
.Op Fl v .Op Fl V
.Ar message room .Ar message room
.Ek .Ek
.Sh DESCRIPTION .Sh DESCRIPTION
@ -69,9 +69,8 @@ At its most basic, matrix-send.conf is a shell script. This means you could
replace the replace the
.Em Password .Em Password
line with something similar to this line with something similar to this
.Bd -literal -offset indent .Pp
Password $(gpg -d /path/to/passwd.gpg) .Dl Password $(gpg -d /path/to/passwd.gpg)
.Ed
.Pp .Pp
where where
.Em /path/to/passwd.gpg .Em /path/to/passwd.gpg
@ -91,11 +90,10 @@ This will be something like
Type the Room ID as the argument after the message you wish to send. Type the Room ID as the argument after the message you wish to send.
You may have to escape the exclamation mark with a backslash. For example: You may have to escape the exclamation mark with a backslash. For example:
.Bd -literal -offset indent
matrix-send "Hello world!" \\!zyxwvutsrq:example.org
.Ed
.Pp .Pp
That should send a message saying .Dl matrix-send "Hello world!" \\!zyxwvutsrq:example.org
.Pp
That would send a message saying
.Em Hello world! .Em Hello world!
to the room with the Room ID !zyxwvutsrq:example.org. to the room with the Room ID !zyxwvutsrq:example.org.
.Pp .Pp
@ -120,5 +118,11 @@ configuration file for
access token cache file access token cache file
.El .El
.Sh EXAMPLES
Send a message saying "How are you?" to the Matrix room !TfbDbeqp:example.org:
.Pp
.Dl matrix-send "How are you?" !TfbDbeqp:example.org
.Pp
.Sh SEE ALSO .Sh SEE ALSO
.Xr matrix-send.conf 5 .Xr matrix-send.conf 5

View file

@ -60,5 +60,16 @@ configuration file for
default access token cache file default access token cache file
.El .El
.Sh EXAMPLES
This configuration would sign into matrix.org under the user
.Em johndoe
using the password
.Em supersecretpassword :
.Bd -literal -offset indent
Server matrix-client.matrix.org
Username johndoe
Password supersecretpassword
.Ed
.Sh SEE ALSO .Sh SEE ALSO
.Xr matrix-send 1 .Xr matrix-send 1