Display either dir metadata size or dir apparent size in ls (#1696)

* Show dir size in ls command

* Add the option to show the apparent directory size via `ls --du`
This commit is contained in:
Joseph T. Lyons
2020-05-03 01:09:17 -04:00
committed by GitHub
parent 0779a46179
commit 8d69c77989
4 changed files with 58 additions and 6 deletions

View File

@ -107,6 +107,7 @@ impl Shell for FilesystemShell {
full,
short_names,
with_symlink_targets,
du,
}: LsArgs,
context: &RunnableContext,
) -> Result<OutputStream, ShellError> {
@ -170,7 +171,8 @@ impl Shell for FilesystemShell {
name_tag.clone(),
full,
short_names,
with_symlink_targets
with_symlink_targets,
du,
)
.map(|entry| ReturnSuccess::Value(entry.into()))?;