summaryrefslogtreecommitdiff
path: root/src/ls.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1995-12-23 17:38:08 +0000
committerJim Meyering <jim@meyering.net>1995-12-23 17:38:08 +0000
commitc22b040b21372c9701c2c0241d3d0b7f3286ec5f (patch)
tree91951d78b0010194ea1c16479edae4dffa64fabe /src/ls.c
parent0c5abc43a0dcb0aaa41936cbf988ef5d1f2de46e (diff)
downloadcoreutils-c22b040b21372c9701c2c0241d3d0b7f3286ec5f.tar.xz
(decode_switches): Make -o a synonym for -lG for compatibility
with most other versions of ls. Reported by Karl Berry. (usage): Update.
Diffstat (limited to 'src/ls.c')
-rw-r--r--src/ls.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/ls.c b/src/ls.c
index 875db2e5c..bed1cf831 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -501,8 +501,7 @@ static struct option const long_options[] =
{"time", required_argument, 0, 11},
{"help", no_argument, &show_help, 1},
{"version", no_argument, &show_version, 1},
- {"color", optional_argument, 0, 'o'},
- {"colour", optional_argument, 0, 'o'},
+ {"color", optional_argument, 0, 13},
{"7bit", no_argument, 0, '7'},
{"8bit", no_argument, 0, '8'},
{0, 0, 0, 0}
@@ -864,7 +863,12 @@ decode_switches (int argc, char **argv)
numeric_users = 1;
break;
- case 'o':
+ case 'o': /* Just like -l, but don't display group info. */
+ format = long_format;
+ inhibit_group = 1;
+ break;
+
+ case 13: /* --color */
if (optarg)
{
i = argmatch (optarg, color_args);
@@ -876,7 +880,7 @@ decode_switches (int argc, char **argv)
i = color_types[i];
}
else
- i = color_yes; /* -o or --color -> do colorize */
+ i = color_yes; /* --color -> do colorize */
if (i == color_if_tty)
print_with_color = isatty (1) ? 1 : 0;
@@ -2545,6 +2549,8 @@ Sort entries alphabetically if none of -cftuSUX nor --sort.\n\
-b, --escape print octal escapes for nongraphic characters\n\
-C list entries by columns\n\
-c sort by change time; with -l: show ctime\n\
+ --color colorize entries according to type\n\
+ --color=WORD yes, no, tty (if output is a terminal)\n\
-D, --dired generate output well suited to Emacs' dired mode\n\
-d, --directory list directory entries instead of contents\n\
-F, --classify append a character for typing each entry\n\
@@ -2564,8 +2570,7 @@ Sort entries alphabetically if none of -cftuSUX nor --sort.\n\
-m fill width with a comma separated list of entries\n\
-N, --literal do not quote entry names\n\
-n, --numeric-uid-gid list numeric UIDs and GIDs instead of names\n\
- -o, --color, --colour colorize entries according to type\n\
- --colo(u)r=WORD yes -o, no, tty (if output is a terminal)\n\
+ -o use long listing format without group info\n\
-p append a character for typing each entry\n\
-Q, --quote-name enclose entry names in double quotes\n\
-q, --hide-control-chars print ? instead of non graphic characters\n\