diff --git a/src/ls.c b/src/ls.c index 9549130..e5b772f 100644 --- a/src/ls.c +++ b/src/ls.c @@ -836,6 +836,7 @@ static struct option const long_options[] = {"block-size", required_argument, NULL, BLOCK_SIZE_OPTION}, {"context", no_argument, 0, 'Z'}, {"author", no_argument, NULL, AUTHOR_OPTION}, + {"digit-group", no_argument, NULL, 'y'}, {GETOPT_HELP_OPTION_DECL}, {GETOPT_VERSION_OPTION_DECL}, {NULL, 0, NULL, 0} @@ -1639,7 +1640,7 @@ decode_switches (int argc, char **argv) { int oi = -1; int c = getopt_long (argc, argv, - "abcdfghiklmnopqrstuvw:xABCDFGHI:LNQRST:UXZ1", + "abcdfghiklmnopqrstuvw:xyABCDFGHI:LNQRST:UXZ1", long_options, &oi); if (c == -1) break; @@ -1760,6 +1761,10 @@ decode_switches (int argc, char **argv) format = horizontal; break; + case 'y': + human_output_opts = human_group_digits; + break; + case 'A': if (ignore_mode == IGNORE_DEFAULT) ignore_mode = IGNORE_DOT_AND_DOTDOT; @@ -4708,6 +4713,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\ -w, --width=COLS assume screen width instead of current value\n\ -x list entries by lines instead of by columns\n\ -X sort alphabetically by entry extension\n\ + -y, --digit-group with -l, group digits of file size\n\ + -Z, --context print any SELinux security context of each file\n\ -1 list one file per line\n\ "), stdout);