git: 9front

Download patch

ref: 63a8d1e3eeb4504931640e00a1a067a2619199c0
parent: e4ec165250a7edc8f940aa25f381678724ca8a20
author: noodle <noodle@pastanoggin.com>
date: Sat Jan 10 23:38:38 EST 2026

tmdate(2), date(1): document using \ to quote brackets in tmdate(2) and show an example in date(1)

--- a/sys/man/1/date
+++ b/sys/man/1/date
@@ -70,6 +70,12 @@
 into
 .BR /env/timezone .
 .PD
+.SH EXAMPLES
+Print the current zero-padded hour and minute in brackets:
+.IP
+.EX
+% date -f '[\e[]hh:mm[\e]]'
+.EE
 .SH SOURCE
 .B /sys/src/cmd/date.c
 .br
--- a/sys/man/2/tmdate
+++ b/sys/man/2/tmdate
@@ -129,6 +129,12 @@
 .TP
 .B [...]
 Quoted text, copied directly to the output.
+To quote a literal
+.B [
+or
+.BR ] ,
+prepend it with a backslash
+.RB ( \e ).
 .TP
 .B _
 When formatting, this inserts padding into the date format.
--