[hackers] [sbase] Add mandoc-manpage for tr(1) || FRIGN

From: <git_AT_suckless.org>
Date: Fri, 16 Jan 2015 11:03:24 +0100 (CET)

commit 33e2df52064871d4aa3b3074ffea2be96d12528d
Author: FRIGN <dev_AT_frign.de>
Date: Fri Jan 16 00:53:50 2015 +0100

    Add mandoc-manpage for tr(1)
    and mark it as finished in the README.

diff --git a/README b/README
index d141d2b..0818408 100644
--- a/README
+++ b/README
_AT_@ -68,7 +68,7 @@ The following tools are implemented (* == finished):
   tee no -i
   test yes none
   touch no -a, -m, -r
- tr yes none
+* tr yes none
   true yes none
   tty yes none
   uudecode no -o
diff --git a/tr.1 b/tr.1
index 5c299c0..288e7ee 100644
--- a/tr.1
+++ b/tr.1
_AT_@ -1,67 +1,76 @@
-.TH TR 1 sbase\-VERSION
-tr \- translate characters
-.B tr
-.RB [ \-d ] [ \-c ]
-.RB set1
-.B tr
-.RB set1
-.RI set2
-.B \-d
-For compatibility. If given, characters in set1 will be deleted from the input and specifying set2 will result in an error.
-.B \-c
-Complementary, causes the specified character set to be inverted, this is all the characters not specified belong to it.
-It only works in conjunction with \-d, because order doesn't make much sense with translation.
-.B tr
-reads input from stdin replacing every character in
-.B set1
-with the character at the same index in
-.B set2.
-If set2 is not given
-.B tr
-deletes the characters in set1 from the input.
-Sets are specified as strings of characters. Almost all represent themselves but the following ones will be interpreted:
-audible BEL
-form feed
-new line
-horizontal tab
-vertical tab
-If set1 is longer than set2
-.B tr
-will map all the remaining characters to the last one in set2. In case set2 is longer than set1, the remaining characters from set2 will be ignored.
-Character escape sequences, be them characters or octal numbers, are done preceding the token with a "\\". You may specify three digits or less for it,
-digits will stop being read when a non-octal character or when three characters are read.
-Use "A-B" for ordered sets fom A to B.
-.B tr
-is Unicode-aware, but only if you don't specify characters in octal (for example \\012), because else it is not predictable. Does not support character
-.IR sed(1)
-.IR awk(1)
+.Dd January 16, 2014
+.Dt TR 1 sbase\-VERSION
+.Nm tr
+.Nd translate characters
+.Nm tr
+.Op Fl c | Fl C
+.Op Fl sd
+.Ar set1 set2
+matches characters from stdin and performs translations to stdout.
+.Bl -tag -width Ds
+.It Fl c | Fl C
+Match to
+.Ar set1
+.It Fl d
+Delete characters matching
+.Ar set1 .
+.It Fl s
+Squeeze repeated characters matching
+.Ar set1
+.Ar set2
+if -d is set.
+.Sh SET
+.Bl -tag -width Ds
+.It Literal 'c'
+.It Escape sequence '\ec'
+\e\e, \ea, \eb, \ef, \en, \er, \et, \ev
+.It Range 'c-d'
+.It Repeat '[c*n]'
+Only in
+.Ar set2 .
+If n = 0 or left out, set n to length of
+.Ar set1 .
+.It Character class '[:class:]'
+.Xr wctype 3 .
+If no options are specified,
+translates from
+.Ar set1
+.Ar set2
+by index or character class.
+.Ar set2
+is shorter than
+.Ar set1 ,
+overflowing characters translate to the last character in
+.Ar set2 .
+.Bl -tag -width Ds
+.It 0
+Input processed successfully.
+.It 1
+An error occurred.
+.Xr sed 1 ,
+.Xr awk 1 ,
+.Xr utf8 7
+utility is compliant with the
+.St -p1003.1-2008
+except from octal sequences and equivalence classes.
Received on Fri Jan 16 2015 - 11:03:24 CET

This archive was generated by hypermail 2.3.0 : Fri Jan 16 2015 - 11:12:15 CET