From 7af26ba3fdf6df01781e0654ea57c81cb7e1f01a Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Fri, 31 Jul 2026 08:58:44 +0800 Subject: [PATCH] docs: document the mcpp-short-cmd aliases in both READMEs (#313) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `xlings install mcpp-short-cmd -y` has shipped (openxlings/xim-pkgindex pkgs/m/mcpp-short-cmd.lua) but nothing in this repo mentioned it, so the answer to "does mcpp support command aliases" read as "no, write them into your shell rc yourself". Folded in under the recommended xlings install rather than as another numbered option: it is not a way to install mcpp, it is a thing you can add after installing it. Both tables are generated from the descriptor's SHORT_CMDS map and checked against it entry by entry — 30/30, no drift. The naming rule is stated so the table is a reference, not something to memorise: initial of every word but the last, last word in full (`mcpp self doctor` -> `msdoctor`). --- README.md | 32 ++++++++++++++++++++++++++++++++ README.zh-CN.md | 31 +++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) diff --git a/README.md b/README.md index b3351cf..0968290 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,38 @@ irm https://d2learn.org/xlings-install.ps1.txt | iex +
+Optional — short commands (mp, mbuild, mrun, …) + +```bash +xlings install mcpp-short-cmd -y +``` + +Registers 30 shims, so `mcpp build` becomes `mbuild`. Naming rule: initial of +every word but the last, plus the last word in full — `mcpp self doctor` → +`msdoctor`. `mp` is bare `mcpp`. They alias the `mcpp` shim rather than a fixed +binary, so `xlings use mcpp ` switches them too. + +| Short | Expands to | Short | Expands to | +| --- | --- | --- | --- | +| `mp` | `mcpp` | `mexpkg` | `mcpp emit xpkg` | +| `mnew` | `mcpp new` | `mxparse` | `mcpp xpkg parse` | +| `mbuild` | `mcpp build` | `mtinstall` | `mcpp toolchain install` | +| `mrun` | `mcpp run` | `mtlist` | `mcpp toolchain list` | +| `mtest` | `mcpp test` | `mtdefault` | `mcpp toolchain default` | +| `mclean` | `mcpp clean` | `mcdir` | `mcpp cache dir` | +| `madd` | `mcpp add` | `mclist` | `mcpp cache list` | +| `mremove` | `mcpp remove` | `mcinfo` | `mcpp cache info` | +| `mupdate` | `mcpp update` | `mcgc` | `mcpp cache gc` | +| `msearch` | `mcpp search` | `milist` | `mcpp index list` | +| `mpublish` | `mcpp publish` | `miadd` | `mcpp index add` | +| `mpack` | `mcpp pack` | `miremove` | `mcpp index remove` | +| `msdoctor` | `mcpp self doctor` | `miupdate` | `mcpp index update` | +| `msenv` | `mcpp self env` | `msconfig` | `mcpp self config` | +| `msversion` | `mcpp self version` | `msexplain` | `mcpp self explain` | + +
+ **Other options**
diff --git a/README.zh-CN.md b/README.zh-CN.md index db1601b..113ee89 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -67,6 +67,37 @@ irm https://d2learn.org/xlings-install.ps1.txt | iex
+
+可选 —— 短命令(mpmbuildmrun …) + +```bash +xlings install mcpp-short-cmd -y +``` + +装 30 个短命令,`mcpp build` 就是 `mbuild`。命名规则:除最后一个词外每词取首字母, +最后一个词写全 —— `mcpp self doctor` → `msdoctor`;`mp` 就是裸 `mcpp`。 +它们指向 `mcpp` 这个 shim 而非固定路径,所以 `xlings use mcpp ` 也会一起切换。 + +| 短命令 | 展开 | 短命令 | 展开 | +| --- | --- | --- | --- | +| `mp` | `mcpp` | `mexpkg` | `mcpp emit xpkg` | +| `mnew` | `mcpp new` | `mxparse` | `mcpp xpkg parse` | +| `mbuild` | `mcpp build` | `mtinstall` | `mcpp toolchain install` | +| `mrun` | `mcpp run` | `mtlist` | `mcpp toolchain list` | +| `mtest` | `mcpp test` | `mtdefault` | `mcpp toolchain default` | +| `mclean` | `mcpp clean` | `mcdir` | `mcpp cache dir` | +| `madd` | `mcpp add` | `mclist` | `mcpp cache list` | +| `mremove` | `mcpp remove` | `mcinfo` | `mcpp cache info` | +| `mupdate` | `mcpp update` | `mcgc` | `mcpp cache gc` | +| `msearch` | `mcpp search` | `milist` | `mcpp index list` | +| `mpublish` | `mcpp publish` | `miadd` | `mcpp index add` | +| `mpack` | `mcpp pack` | `miremove` | `mcpp index remove` | +| `msdoctor` | `mcpp self doctor` | `miupdate` | `mcpp index update` | +| `msenv` | `mcpp self env` | `msconfig` | `mcpp self config` | +| `msversion` | `mcpp self version` | `msexplain` | `mcpp self explain` | + +
+ **其他方式**