Skip to content

Commit 7143bf1

Browse files
committed
fix: Seperate deleted file feedback with spaces
Fixes: #20
1 parent 749c027 commit 7143bf1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/rm/rm.go

+7-1
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,14 @@ func deletePaths(paths []string, config models.Config, arguments []string) {
182182
removedFiles = append(removedFiles, path)
183183
}
184184

185-
for _, path := range removedFiles {
185+
removedFilesLen := len(removedFiles)
186+
for i, path := range removedFiles {
186187
fmt.Print(path)
188+
189+
// TODO: we might want to make this the shells IFS value
190+
if i != removedFilesLen {
191+
fmt.Print(" ")
192+
}
187193
}
188194
// do an empty print line last so that when the shell returns to a
189195
// prompt the prompt will be on its own line

0 commit comments

Comments
 (0)