Print folder names when the user asks to list several folders

This commit is contained in:
Anis ELLEUCH
2015-09-15 20:55:32 -07:00
committed by Harshavardhana
parent 6ebd998adf
commit b7fbd307d4
+6
View File
@@ -106,9 +106,15 @@ func mainList(ctx *cli.Context) {
})
config := mustGetMcConfig()
showFolderNames := len(args) > 1
for _, arg := range args {
targetURL := getAliasURL(arg, config.Aliases)
if !globalJSONFlag && showFolderNames {
console.Println(arg + ":")
}
// if recursive strip off the "..."
err := doListCmd(stripRecursiveURL(targetURL), isURLRecursive(targetURL))
fatalIf(err.Trace(targetURL), "Unable to list target ‘"+targetURL+"’.")