dropbox / dbxcli

A command line client for Dropbox built using the Go SDK
Other
1.05k stars 101 forks source link

`search -l` doesn't have newlines in output #132

Open mgrandi opened 4 years ago

mgrandi commented 4 years ago

version:

dbxcli version: v3.0.0
SDK version: 5.4.0
Spec version: 097e9ba

doing ls -l works properly:

PS C:\Users\auror\Programs\dbxcli> .\dbxcli-windows-amd64-3.0.0.exe ls -l TestingFolder
Revision              Size Last modified Path
597d10a398375001c0d0c 31 B 3 minutes ago /TestingFolder/testing_file.txt
597d10a9bda11001c0d0c 25 B 3 minutes ago /TestingFolder/testing_file_2.txt
597d10ad00f54001c0d0c 24 B 3 minutes ago /TestingFolder/testing_file_3.txt

but doing search -l seems to be missing new lines

PS C:\Users\auror\Programs\dbxcli> .\dbxcli-windows-amd64-3.0.0.exe search -l "testing_file"
Revision        Size    Last modified   Path
597d10a398375001c0d0c   31 B    3 minutes ago   /TestingFolder/testing_file.txt 597d10ad00f54001c0d0c   24 B    3 minutes ago   /TestingFolder/testing_file_3.txt    597d10a9bda11001c0d0c   25 B    3 minutes ago   /TestingFolder/testing_file_2.txt
PS C:\Users\auror\Programs\dbxcli>

it looks like this snippet is missing in search.go, that is present in ls.go:

        if i%4 == 0 || long {
            fmt.Fprintln(w)
        }

https://github.com/dropbox/dbxcli/blob/master/cmd/ls.go#L117 https://github.com/dropbox/dbxcli/blob/master/cmd/search.go#L54