tree: option to print human-readable sizes removed in favor of global option

This commit is contained in:
albertony 2021-04-03 13:56:15 +02:00
parent 6d25ba7c02
commit 8c4b06da79
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,6 @@ func init() {
flags.StringVarP(cmdFlags, &outFileName, "output", "o", "", "Output to file instead of stdout.")
// Files
flags.BoolVarP(cmdFlags, &opts.ByteSize, "size", "s", false, "Print the size in bytes of each file.")
flags.BoolVarP(cmdFlags, &opts.UnitSize, "human", "", false, "Print the size in a more human readable way.")
flags.BoolVarP(cmdFlags, &opts.FileMode, "protections", "p", false, "Print the protections for each file.")
// flags.BoolVarP(cmdFlags, &opts.ShowUid, "uid", "", false, "Displays file owner or UID number.")
// flags.BoolVarP(cmdFlags, &opts.ShowGid, "gid", "", false, "Displays file group owner or GID number.")
@ -109,6 +108,7 @@ short options as they conflict with rclone's short options.
opts.NameSort = sort == "name"
opts.SizeSort = sort == "size"
ci := fs.GetConfig(context.Background())
opts.UnitSize = ci.HumanReadable
if opts.DeepLevel == 0 {
opts.DeepLevel = ci.MaxDepth
}