MK_CMDS(1)
π MK_CMDS π
okay bestie, gather round, because we're talking about mk_cmds β the error table compiler from the General Commands Manual. yes it's a whole thing and yes you're gonna slay it π
β¨ SYNOPSIS β¨
mk_cmds file
like that's it. one little file argument and we're off π¦
πΈ DESCRIPTION πΈ
so what does mk_cmds actually do, you ask? it takes a table that lists command names plus their associated help messages, and it turns that whole vibe into a C source file that's suitable for use with the ss(3) library. it's giving compiler, it's giving translator, it's giving main character energy β¨
lowkey important: the source file name must end with a suffix of.ct. no.ct, no deal, bestie π
the file is made up of a declaration that supplies the name of the command table:
command_table name
...and then it's followed by entries that look exactly like this:
[ request | unimplemented ] name, " string "[, abbrev]...;
and then a final
end
to indicate the end of the table. periodt. π
so after all that, a C source file is generated, and you should compile and link it with the object files use the ss library. (that's literally what the page says, i'm not making it up π«Ά)
also!! a # in the source file is treated as a comment character, and all the remaining text to the end of the source line gets ignored. so go off with your comments, they will not be perceived π
π BUGS π
ok so here's the tea and it's a little messy. since the original mk_cmds uses a very simple parser based on yacc(1), and this current version of mk_cmds uses an awk/sed combination of scripts, its error recovery leaves much to be desired. not me exposing the whole thing but fr fr, that's what it says π
π SEE ALSO π
ss (3)β go read it, bestie, iykyk π
and that's the whole page, diva. this absolute icon came to you courtesy of E2FSPROGS, dated 2003, and no cap it's still out here doing its thing. mwah πβ¨π
π¦ where this page comes from
- alpine 3.22: e2fsprogs-doc 1.47.2-r2 Β· GPL-2.0-or-later AND LGPL-2.0-or-later AND BSD-3-Clause AND MIT
- alpine 3.23: e2fsprogs-doc 1.47.3-r0 Β· GPL-2.0-or-later AND LGPL-2.0-or-later AND BSD-3-Clause AND MIT
- alpine 3.24: e2fsprogs-doc 1.47.4-r0 Β· GPL-2.0-or-later AND LGPL-2.0-or-later AND BSD-3-Clause AND MIT
- arch rolling: e2fsprogs 1.47.4-1 Β· GPL AND LGPL AND MIT
- centos-stream 9: libss-devel 1.46.5-8.el9 Β· MIT
- centos-stream 9: libss-devel 1.46.5-8.el9 Β· MIT
- debian bookworm: ss-dev 2.0-1.47.0-2+b2 Β· GPL-2.0-only
- debian trixie: ss-dev 2.0-1.47.2-3+b12 Β· GPL-2.0-only
- fedora 43: libss-devel 1.47.3-2.fc43 Β· MIT
- fedora 43: libss-devel 1.47.3-2.fc43 Β· MIT
- fedora 44: libss-devel 1.47.3-4.fc44 Β· MIT
- fedora 44: libss-devel 1.47.3-4.fc44 Β· MIT
- nixpkgs unstable: e2fsprogs 1.47.4
- opensuse-leap 16.0: libcom_err-devel 1.47.0-160000.3.2 Β· MIT
- opensuse-leap 16.0: libcom_err-devel 1.47.0-160000.3.2 Β· MIT
- opensuse-leap 16.0: libcom_err-devel 1.47.0-160000.3.2 Β· MIT
- opensuse-leap 16.0: libcom_err-devel 1.47.0-160000.3.2 Β· MIT
- ubuntu jammy: ss-dev 2.0-1.46.5-2ubuntu1
- ubuntu jammy: ss-dev 2.0-1.46.5-2ubuntu1.1
- ubuntu jammy: ss-dev 2.0-1.46.5-2ubuntu1.2
- ubuntu noble: ss-dev 2.0-1.47.0-2.4~exp1ubuntu4 Β· GPL-2.0-only
- ubuntu noble: ss-dev 2.0-1.47.0-2.4~exp1ubuntu4.1 Β· GPL-2.0-only
- ubuntu questing: ss-dev 2.0-1.47.2-3ubuntu2
- ubuntu resolute: ss-dev 2.0-1.47.2-3ubuntu4 Β· GPL-2.0-only
- ubuntu stonking: ss-dev 2.0-1.47.4-1 Β· GPL-2.0-only
- Copyright (c) 2003 Theodore Ts'o
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms