summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2006-07-20 10:20:23 +0000
committerJim Meyering <jim@meyering.net>2006-07-20 10:20:23 +0000
commit3ddfde68978041476ed0d0768b42060d160b83b2 (patch)
treee3b86c0f996cfba2dc3907a1f706a1b21f17a2c6 /src
parentaa91e4fe348cf1d90655b2dda7868279166ab0c8 (diff)
downloadcoreutils-3ddfde68978041476ed0d0768b42060d160b83b2.tar.xz
Fix a bug: ls --file-type worked like --indicator-style=slash,
rather than like --indicator-style=file-type. (FILE_TYPE_INDICATOR_OPTION): New enum member. (long_options): Map "file-type" to FILE_TYPE_INDICATOR_OPTION, not to 'p'. (decode_switches): Handle new case: FILE_TYPE_INDICATOR_OPTION.
Diffstat (limited to 'src')
-rw-r--r--src/ls.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ls.c b/src/ls.c
index cdb31183b..ef0b902e5 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -737,6 +737,7 @@ enum
GROUP_DIRECTORIES_FIRST_OPTION,
HIDE_OPTION,
INDICATOR_STYLE_OPTION,
+ FILE_TYPE_INDICATOR_OPTION,
/* FIXME: --kilobytes is deprecated (but not -k); remove in late 2006 */
KILOBYTES_LONG_OPTION,
@@ -770,7 +771,7 @@ static struct option const long_options[] =
{"almost-all", no_argument, NULL, 'A'},
{"ignore-backups", no_argument, NULL, 'B'},
{"classify", no_argument, NULL, 'F'},
- {"file-type", no_argument, NULL, 'p'},
+ {"file-type", no_argument, NULL, FILE_TYPE_INDICATOR_OPTION},
{"si", no_argument, NULL, SI_OPTION},
{"dereference-command-line", no_argument, NULL, 'H'},
{"dereference-command-line-symlink-to-dir", no_argument, NULL,
@@ -1530,6 +1531,10 @@ decode_switches (int argc, char **argv)
print_with_color = false; /* disable --color */
break;
+ case FILE_TYPE_INDICATOR_OPTION: /* --file-type */
+ indicator_style = file_type;
+ break;
+
case 'g':
format = long_format;
print_owner = false;