summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2001-01-28 21:34:35 +0000
committerJim Meyering <jim@meyering.net>2001-01-28 21:34:35 +0000
commit2bc68d2234eb2bd4c959dfc6b1c9a3990ab4c4eb (patch)
tree18796b338b23dad110f6600f8deeeaa3e5256a29
parentd6f931281ef4c97c8a1b7a917995f9a466d08bd6 (diff)
downloadcoreutils-2bc68d2234eb2bd4c959dfc6b1c9a3990ab4c4eb.tar.xz
[FULL_TIME]: Define.
(long_options): Use it. (decode_switches): Make --full-time imply -l.
-rw-r--r--src/ls.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ls.c b/src/ls.c
index 290640b60..0b14ca5e2 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -671,6 +671,7 @@ enum
BLOCK_SIZE_OPTION = CHAR_MAX + 1,
COLOR_OPTION,
FORMAT_OPTION,
+ FULL_TIME,
INDICATOR_STYLE_OPTION,
QUOTING_STYLE_OPTION,
SHOW_CONTROL_CHARS_OPTION,
@@ -684,7 +685,7 @@ static struct option const long_options[] =
{"escape", no_argument, 0, 'b'},
{"directory", no_argument, 0, 'd'},
{"dired", no_argument, 0, 'D'},
- {"full-time", no_argument, &full_time, 1},
+ {"full-time", no_argument, 0, FULL_TIME},
{"human-readable", no_argument, 0, 'h'},
{"inode", no_argument, 0, 'i'},
{"kilobytes", no_argument, 0, 'k'},
@@ -1288,6 +1289,11 @@ decode_switches (int argc, char **argv)
format = XARGMATCH ("--format", optarg, format_args, format_types);
break;
+ case FULL_TIME:
+ format = long_format;
+ full_time = 1;
+ break;
+
case COLOR_OPTION:
if (optarg)
i = XARGMATCH ("--color", optarg, color_args, color_types);