]> git.ipfire.org Git - thirdparty/systemd.git/commit
format-table: generate better JSON field names
authorLennart Poettering <lennart@poettering.net>
Tue, 5 May 2020 06:09:04 +0000 (08:09 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 5 May 2020 06:13:58 +0000 (08:13 +0200)
commite21b76cd68b4f41a122b7d5a779a17dd28f411de
tree742679d1f26e344726c6f7b01d08690631083cf7
parent848cfa74d275180c1c74213c4abc2ba04170e053
format-table: generate better JSON field names

Let's try to mangle table contents a bit to make them more suitable as
JSON field names. Specifically when we see "foo bar" convert this to
"foo_bar" as field name, as variable/field names are generally assumed
to be without spaces.
src/shared/format-table.c