diff options
author | Ian Abbott <abbotti@mev.co.uk> | 2017-05-17 12:46:49 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2017-05-17 15:52:43 +0200 |
commit | 495111d91a35f63d8fa68749f0c4fe3b0ad31e54 (patch) | |
tree | ac3b141d63d3b43c4792800e19822a4680632dca | |
parent | 2e756eefae13ecf2c5c0a2c3ebcca1a6151ac476 (diff) | |
download | barebox-495111d91a35f63d8fa68749f0c4fe3b0ad31e54.tar.gz barebox-495111d91a35f63d8fa68749f0c4fe3b0ad31e54.tar.xz |
commands: add ':' as alias for 'true'
':' is the null command, sometimes used in shell scripts (especially
after 'then'), but it is not yet supported by barebox. It is supposed
to do nothing, successfully, just like the 'true' command, so add it as
an alias.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | commands/true.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/commands/true.c b/commands/true.c index 24dea46929..b850f51651 100644 --- a/commands/true.c +++ b/commands/true.c @@ -26,7 +26,10 @@ static int do_true(int argc, char *argv[]) return 0; } +static const char *true_aliases[] = { ":", NULL}; + BAREBOX_CMD_START(true) + .aliases = true_aliases, .cmd = do_true, BAREBOX_CMD_DESC("do nothing, successfully") BAREBOX_CMD_GROUP(CMD_GRP_SCRIPT) |