mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-15 04:13:11 +00:00
ls: Display results in long format when -n
or -o
are used
This commit is contained in:
parent
dc19de58d0
commit
d618ef58fb
|
@ -30,8 +30,8 @@ If no *path* argument is provided the current working directory is used.
|
||||||
* `-G`: Use pretty colors
|
* `-G`: Use pretty colors
|
||||||
* `-i`, `--inode`: Show inode ids
|
* `-i`, `--inode`: Show inode ids
|
||||||
* `-I`, `--raw-inode`: Show raw inode ids if possible (see Notes to understand when this will not work)
|
* `-I`, `--raw-inode`: Show raw inode ids if possible (see Notes to understand when this will not work)
|
||||||
* `-n`, `--numeric-uid-gid`: In long format, display numeric UID/GID
|
* `-n`, `--numeric-uid-gid`: In long format, display numeric UID/GID. Implies `-l`
|
||||||
* `-o`, In long format, do not show group information
|
* `-o`: In long format, do not show group information. Implies `-l`
|
||||||
* `-h`, `--human-readable`: Print human-readable sizes
|
* `-h`, `--human-readable`: Print human-readable sizes
|
||||||
* `--si`: Print human-readable sizes in SI units
|
* `--si`: Print human-readable sizes in SI units
|
||||||
* `-K`, `--no-hyperlinks`: Disable hyperlinks
|
* `-K`, `--no-hyperlinks`: Disable hyperlinks
|
||||||
|
|
|
@ -131,8 +131,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
args_parser.add_option(flag_colorize, "Use pretty colors", nullptr, 'G');
|
args_parser.add_option(flag_colorize, "Use pretty colors", nullptr, 'G');
|
||||||
args_parser.add_option(flag_show_inode, "Show inode ids", "inode", 'i');
|
args_parser.add_option(flag_show_inode, "Show inode ids", "inode", 'i');
|
||||||
args_parser.add_option(flag_show_raw_inode, "Show raw inode ids if possible", "raw-inode", 'I');
|
args_parser.add_option(flag_show_raw_inode, "Show raw inode ids if possible", "raw-inode", 'I');
|
||||||
args_parser.add_option(flag_print_numeric, "In long format, display numeric UID/GID", "numeric-uid-gid", 'n');
|
args_parser.add_option(flag_print_numeric, "In long format, display numeric UID/GID. Implies '-l'", "numeric-uid-gid", 'n');
|
||||||
args_parser.add_option(flag_hide_group, "In long format, do not show group information", nullptr, 'o');
|
args_parser.add_option(flag_hide_group, "In long format, do not show group information. Implies '-l'", nullptr, 'o');
|
||||||
args_parser.add_option(flag_human_readable, "Print human-readable sizes", "human-readable", 'h');
|
args_parser.add_option(flag_human_readable, "Print human-readable sizes", "human-readable", 'h');
|
||||||
args_parser.add_option(flag_human_readable_si, "Print human-readable sizes in SI units", "si", 0);
|
args_parser.add_option(flag_human_readable_si, "Print human-readable sizes in SI units", "si", 0);
|
||||||
args_parser.add_option(flag_disable_hyperlinks, "Disable hyperlinks", "no-hyperlinks", 'K');
|
args_parser.add_option(flag_disable_hyperlinks, "Disable hyperlinks", "no-hyperlinks", 'K');
|
||||||
|
@ -141,6 +141,9 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
args_parser.add_positional_argument(paths, "Directory to list", "path", Core::ArgsParser::Required::No);
|
args_parser.add_positional_argument(paths, "Directory to list", "path", Core::ArgsParser::Required::No);
|
||||||
args_parser.parse(arguments);
|
args_parser.parse(arguments);
|
||||||
|
|
||||||
|
if (flag_print_numeric || flag_hide_group)
|
||||||
|
flag_long = true;
|
||||||
|
|
||||||
if (flag_show_almost_all_dotfiles)
|
if (flag_show_almost_all_dotfiles)
|
||||||
flag_show_dotfiles = true;
|
flag_show_dotfiles = true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue