3 ms·
I feel like this should be simpler: MISH_CMD_NAMES(set, "set"); MISH_CMD_HELP(set, "set 'cnt' variable", "test command for libmish!"); MISH_CMD_R
by cheez 6y ago
I feel like this should be simpler:
MISH_CMD_NAMES(set, "set");
MISH_CMD_HELP(set,
"set 'cnt' variable",
"test command for libmish!");
MISH_CMD_REGISTER(set, _test_set_cnt);
Should be
MISH_CMD(set,
_test_set_cnt,
"set 'cnt' variable",
"test command for libmish!")
Which can expand as needed.
- buserror 6y agoYes, I like the single macro, but that doesn't handle the multiple possible names, and multiple lines of help... but I agree, I probably will add a single alias for simple cases.