New release: boxes v2.3.0
Adds support for UTF-8 box designs, and color in box designs.
This is the biggest change to the code base since the original implementation. Although we literally added hundreds of new tests, it is still quite possible that some bugs slipped in. Please bear with us, and take the time to report (and maybe even fix!) them.
Functional Changes
- The boxes config file is now UTF-8 encoded, which allows for lots of new box designs based on UTF-8 characters. Some examples are among the newly added designs below. This includes characters that take up more than one column in a terminal, such as Chinese script. #72
- ANSI color codes are now allowed in box shapes (see colored box shapes). It’s a bit technical, because you need to write ANSI color codes, but quite powerful and versatile.
- The new command line options
--color
and--no-color
can be used to force whether colors are printed by boxes. The default is to print colors if the terminal is color-capable. - Add long options capability to command line. Every existing option stays the same, but can now also be written in
long form, for example
--mend
instead of-m
. The complete list is on the man page and in the output ofboxes --help
. - Alias definitions are now active in the config file for some designs. We have “lua-cmt” and “sql-cmt” as aliases for “ada-cmt”, and “lua-box” and “sql-box” for “ada-box”.
- We dropped the (mostly unused) fields
created
,revision
, andrevdate
from the boxes config file. They were introduced when Git hadn’t been invented yet and boxes was versioned with RCS. Today, a look into Git tells us all about when stuff was created or modified, so we felt this was the time to shed some ballast.
Technical / Internal Changes
- In order to properly support colors in every terminal, we now depend on the ncurses library.
- Add MacOS to GitHub Actions workflow and support all test categories on MacOS by @mathomp4
- Removed linker
--wrap
option so unit tests can run on MacOS by @chorpler - Speed up GitHub Actions runs by no longer calculating the coverage per test. Instead, we calculate the overall
coverage. If you need coverage per test you can get it by calling the test runner with
--coverage-per-test
instead of--coverage
. - New test suite with “sunny-day tests”, which simply creates, mends, and removes every box in our official config
file. Run this test suite by invoking
make test-sunny
ormake covtest-sunny
(with coverage).
New Box Designs
- New box designs “ansi”, “ansi-dashed”, “ansi-double”, “ansi-heavy”, “ansi-heavy-dashed”, “ansi-rounded”, and “ansi-rounded-dashed” by @chorpler, all taking advantage of Unicode box drawing characters
- New Box designs “info”, “warning”, and “critical” by @tsjensen as examples of colored Unicode boxes. The “critical” box design even colors its box contents. In the design list, colored designs feature a little moon icon that you can hover over in order to try out a dark background.
- New box design “dragon”
- The box designs “stark2”, “sunset”, “whirly”, and “xes” received some default padding, hopefully making them appear nicer by default.