diff options
author | Jan Luebbe <jlu@pengutronix.de> | 2014-06-18 21:41:02 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-06-23 08:41:53 +0200 |
commit | 5c2852ff9ef62b95ac9c42e9d8dbd4c11ffb632d (patch) | |
tree | fbdee93803399dca66363f09c51492239e1e8057 /commands | |
parent | 429717b48ccf3b56c3dd508513618763e2001b15 (diff) | |
download | barebox-5c2852ff9ef62b95ac9c42e9d8dbd4c11ffb632d.tar.gz barebox-5c2852ff9ef62b95ac9c42e9d8dbd4c11ffb632d.tar.xz |
commands: ls: add ll as an alias for ls -l
This saves one second of user time on every interactive boot.
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands')
-rw-r--r-- | commands/ls.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/commands/ls.c b/commands/ls.c index 344079030a..f8144aecdb 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 |