[hackers] [libixp] Properly bracket the usage information in ixpc. Add xwrite to ixpc.1, and modify the examples appropriately.

From: Kris Maglione <jg_AT_suckless.org>
Date: Fri Feb 16 08:34:46 2007

changeset: 33:315648ab550d
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Fri Feb 16 02:34:21 2007 -0500
summary: Properly bracket the usage information in ixpc. Add xwrite to ixpc.1, and modify the examples appropriately.

diff -r b42525592801 -r 315648ab550d ixpc.1
--- a/ixpc.1 Fri Feb 16 02:13:56 2007 -0500
+++ b/ixpc.1 Fri Feb 16 02:34:21 2007 -0500
@@ -40,7 +40,7 @@ The syntax of the actions is as follows:
 The syntax of the actions is as follows:
 .TP
 .B write
-Writes the supplied data from stdin to
+Writes the supplied data from the standard input to
 .IR file,
 overwriting any previous data. The data to be written is arbitrary
 and only gains meaning (and restrictions) when it is interpreted by
@@ -48,6 +48,10 @@ See
 See
 .B EXAMPLES
 below.
+.TP
+.B xwrite
+The same as write, but the data is taken from subsequent arguments,
+rather than the standard input.
 .TP
 .B create
 Creates file or directory. If the file exists,
@@ -73,14 +77,15 @@ filesystem, see
 filesystem, see
 .BR wmiiwm (1).
 .TP
-.B echo -n quit | ixpc write /ctl
+.B ixpc xwrite /ctl quit
 Write 'quit' to the main control file of the wmii filesystem, effectively
 leaving wmii.
 .TP
-.B echo -n view 2 | ixpc write /ctl
-Bring into view all clients tagged '2'. To learn about clients and
-tags, see
-.BR wmii (1).
+.B ixpc write /keys \< keys.txt
+Replace the contents of
+.I /keys
+with the contents of
+.I keys.txt
 .SH SEE ALSO
 .BR wmii (1)
 
diff -r b42525592801 -r 315648ab550d ixpc.c
--- a/ixpc.c Fri Feb 16 02:13:56 2007 -0500
+++ b/ixpc.c Fri Feb 16 02:34:21 2007 -0500
@@ -290,7 +290,7 @@ main(int argc, char *argv[]) {
                 xawrite(file, IXP_OWRITE);
         }else {
 Usage:
- ixp_eprint("usage: ixpc [-a <address>] create | read | ls [-l] | remove | write <file>\n"
+ ixp_eprint("usage: ixpc [-a <address>] {create | read | ls [-l] | remove | write} <file>\n"
                            " ixpc [-a <address>] xwrite <file> <data>\n"
                            " ixpc -v\n");
         }
Received on Fri Feb 16 2007 - 08:34:46 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:55:22 UTC