Add option to specify binary or decimal sizes (#2118)

* Add option to specify binary or decimal sizes

* Fix test case error message

* Add documentation

* Fix typo
This commit is contained in:
Joe Lim authored and GitHub committed 2025-08-26 22:32:33 +10:00
1 parent 8150586bc2
commit 4fe8f5a858
8 files changed
+103 -31

No files matched your search

+8
View File
@@ -378,6 +378,14 @@ func (e *setExpr) eval(app *app, args []string) {
return
}
gOpts.shellopts = strings.Split(e.val, ":")
case "sizeunits":
switch e.val {
case "binary", "decimal":
gOpts.sizeunits = e.val
default:
app.ui.echoerr("sizeunits: value should either be 'binary' or 'decimal'")
return
}
case "sortby":
method := sortMethod(e.val)
if !isValidSortMethod(method) {