aboutsummaryrefslogtreecommitdiff
path: root/doc/field-roles.rst
diff options
context:
space:
mode:
authorPhil Shafer <phil@FreeBSD.org>2019-11-07 03:46:17 +0000
committerPhil Shafer <phil@FreeBSD.org>2019-11-07 03:46:17 +0000
commit0922e92a305ac1fd58f814909bbaf2f9fed56552 (patch)
tree18a216e3ddbb93d26f724bd060cea02c4d728c19 /doc/field-roles.rst
parent9e479b34558cf3511b48949f314de96011a16895 (diff)
Notes
Diffstat (limited to 'doc/field-roles.rst')
-rw-r--r--doc/field-roles.rst90
1 files changed, 46 insertions, 44 deletions
diff --git a/doc/field-roles.rst b/doc/field-roles.rst
index 81f890b493b3..4de810c64658 100644
--- a/doc/field-roles.rst
+++ b/doc/field-roles.rst
@@ -8,23 +8,25 @@ Field Roles
Field roles are optional, and indicate the role and formatting of the
content. The roles are listed below; only one role is permitted:
-=== ============== =================================================
-R Name Description
-=== ============== =================================================
-C color Field has color and effect controls
-D decoration Field is non-text (e.g., colon, comma)
-E error Field is an error message
-G gettext Call gettext(3) on the format string
-L label Field is text that prefixes a value
-N note Field is text that follows a value
-P padding Field is spaces needed for vertical alignment
-T title Field is a title value for headings
-U units Field is the units for the previous value field
-V value Field is the name of field (the default)
-W warning Field is a warning message
-[ start-anchor Begin a section of anchored variable-width text
-] stop-anchor End a section of anchored variable-width text
-=== ============== =================================================
+ === ============== =================================================
+ R Name Description
+ === ============== =================================================
+ C color Field has color and effect controls
+ D decoration Field is non-text (e.g., colon, comma)
+ E error Field is an error message
+ G gettext Call gettext(3) on the format string
+ L label Field is text that prefixes a value
+ N note Field is text that follows a value
+ P padding Field is spaces needed for vertical alignment
+ T title Field is a title value for headings
+ U units Field is the units for the previous value field
+ V value Field is the name of field (the default)
+ W warning Field is a warning message
+ [ start-anchor Begin a section of anchored variable-width text
+ ] stop-anchor End a section of anchored variable-width text
+ === ============== =================================================
+
+::
EXAMPLE:
xo_emit("{L:Free}{D::}{P: }{:free/%u} {U:Blocks}\n",
@@ -80,36 +82,36 @@ foreground and background colors, respectively::
The following table lists the supported effects:
-=============== =================================================
- Name Description
-=============== =================================================
- bg-XXXXX Change background color
- bold Start bold text effect
- fg-XXXXX Change foreground color
- inverse Start inverse (aka reverse) text effect
- no-bold Stop bold text effect
- no-inverse Stop inverse (aka reverse) text effect
- no-underline Stop underline text effect
- normal Reset effects (only)
- reset Reset colors and effects (restore defaults)
- underline Start underline text effect
-=============== =================================================
+ =============== =================================================
+ Name Description
+ =============== =================================================
+ bg-XXXXX Change background color
+ bold Start bold text effect
+ fg-XXXXX Change foreground color
+ inverse Start inverse (aka reverse) text effect
+ no-bold Stop bold text effect
+ no-inverse Stop inverse (aka reverse) text effect
+ no-underline Stop underline text effect
+ normal Reset effects (only)
+ reset Reset colors and effects (restore defaults)
+ underline Start underline text effect
+ =============== =================================================
The following color names are supported:
-========= ============================================
- Name Description
-========= ============================================
- black
- blue
- cyan
- default Default color for foreground or background
- green
- magenta
- red
- white
- yellow
-========= ============================================
+ ========= ============================================
+ Name Description
+ ========= ============================================
+ black
+ blue
+ cyan
+ default Default color for foreground or background
+ green
+ magenta
+ red
+ white
+ yellow
+ ========= ============================================
When using colors, the developer should remember that users will
change the foreground and background colors of terminal session