mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:38:12 +00:00
ls: Left justify owner and group information in long format
This commit is contained in:
parent
cb1851f3cc
commit
938a287d3e
1 changed files with 4 additions and 4 deletions
|
@ -373,18 +373,18 @@ static bool print_filesystem_object(DeprecatedString const& path, DeprecatedStri
|
||||||
if (!flag_hide_owner) {
|
if (!flag_hide_owner) {
|
||||||
auto username = users.get(st.st_uid);
|
auto username = users.get(st.st_uid);
|
||||||
if (!flag_print_numeric && username.has_value()) {
|
if (!flag_print_numeric && username.has_value()) {
|
||||||
printf(" %7s", username.value().characters());
|
printf(" %-7s", username.value().characters());
|
||||||
} else {
|
} else {
|
||||||
printf(" %7u", st.st_uid);
|
printf(" %-7u", st.st_uid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!flag_hide_group) {
|
if (!flag_hide_group) {
|
||||||
auto groupname = groups.get(st.st_gid);
|
auto groupname = groups.get(st.st_gid);
|
||||||
if (!flag_print_numeric && groupname.has_value()) {
|
if (!flag_print_numeric && groupname.has_value()) {
|
||||||
printf(" %7s", groupname.value().characters());
|
printf(" %-7s", groupname.value().characters());
|
||||||
} else {
|
} else {
|
||||||
printf(" %7u", st.st_gid);
|
printf(" %-7u", st.st_gid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue