From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WxLjh-0007PM-8R for barebox@lists.infradead.org; Wed, 18 Jun 2014 19:41:34 +0000 From: Jan Luebbe Date: Wed, 18 Jun 2014 21:41:02 +0200 Message-Id: <1403120463-24005-1-git-send-email-jlu@pengutronix.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH] commands: ls: add ll as an alias for ls -l To: barebox@lists.infradead.org This saves one second of user time on every interactive boot. Signed-off-by: Jan Luebbe --- commands/ls.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/commands/ls.c b/commands/ls.c index 3440790..f8144ae 100644 --- a/commands/ls.c +++ b/commands/ls.c @@ -127,6 +127,9 @@ static int do_ls(int argc, char *argv[]) ulong flags = LS_COLUMN; struct string_list sl; + if (!strcmp(argv[0], "ll")) + flags &= ~LS_COLUMN; + while((opt = getopt(argc, argv, "RCl")) > 0) { switch(opt) { case 'R': @@ -219,3 +222,11 @@ BAREBOX_CMD_START(ls) BAREBOX_CMD_GROUP(CMD_GRP_FILE) BAREBOX_CMD_HELP(cmd_ls_help) BAREBOX_CMD_END + +BAREBOX_CMD_START(ll) + .cmd = do_ls, + BAREBOX_CMD_DESC("list a file or directory with details") + BAREBOX_CMD_OPTS("[-lCR] [FILEDIR...]") + BAREBOX_CMD_GROUP(CMD_GRP_FILE) + BAREBOX_CMD_HELP(cmd_ls_help) +BAREBOX_CMD_END -- 1.9.1 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox