Skip to content
This repository was archived by the owner on Jun 2, 2022. It is now read-only.

Commit 0ff5bc1

Browse files
authored
Merge pull request #780 from MikaelSmith/fix-ls-formatting
Fix ls output for format change
2 parents aba5a09 + 04322da commit 0ff5bc1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cmd/ls.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,11 @@ func formatItem(item lsItem, longFormat bool) [][]string {
8080
return rows
8181
}
8282

83+
// Pads a row to ensure the same number of columns.
84+
// Note that the name is put at the beginning so directories are listed on the left.
8385
func pad(str string, longFormat bool) []string {
8486
if longFormat {
85-
return []string{str, "", ""}
87+
return []string{str, "", "", ""}
8688
}
8789
return []string{str}
8890
}

0 commit comments

Comments
 (0)