File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import ArgumentParser
1313
1414struct DiskSpace : ParsableCommand {
1515 @Flag ( name: [ . customShort( " H " ) , . long] ,
16- help: " ' Human- readable' output using unit suffixes" )
16+ help: " Human readable output using unit suffixes " )
1717 var humanReadable = false
1818
1919 @Flag ( name: . shortAndLong,
@@ -32,7 +32,7 @@ struct DiskSpace : ParsableCommand {
3232 help: " Print only the value of the total Capacity " )
3333 var total = false
3434
35- @Argument var volumePath = " / "
35+ @Argument ( help : " path to the volume " ) var volumePath = " / "
3636
3737 func printValue( value int: Int , label: String ? = nil ) {
3838 printValue ( value: Int64 ( int) , label: label)
@@ -48,7 +48,8 @@ struct DiskSpace : ParsableCommand {
4848 }
4949
5050 if let label = label {
51- print ( " \( label) : \( value) " )
51+ let paddedLabel = " \( label) : " . padding ( toLength: 15 , withPad: " " , startingAt: 0 )
52+ print ( " \( paddedLabel) \( value) " )
5253 } else {
5354 print ( value)
5455 }
You can’t perform that action at this time.
0 commit comments