mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] commands: add ':' as alias for 'true'
@ 2017-05-17 11:46 Ian Abbott
  2017-05-17 13:56 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ian Abbott @ 2017-05-17 11:46 UTC (permalink / raw)
  To: barebox; +Cc: Ian Abbott

':' 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>
---
 commands/true.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/commands/true.c b/commands/true.c
index 24dea4692..b850f5165 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)
-- 
2.11.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-05-17 13:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-17 11:46 [PATCH] commands: add ':' as alias for 'true' Ian Abbott
2017-05-17 13:56 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox