From b7fbd307d4df2c806c303533885e6327fcab04d4 Mon Sep 17 00:00:00 2001 From: Anis ELLEUCH Date: Tue, 8 Sep 2015 20:43:55 +0100 Subject: [PATCH] Print folder names when the user asks to list several folders --- ls-main.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ls-main.go b/ls-main.go index 05f0801e..03a88436 100644 --- a/ls-main.go +++ b/ls-main.go @@ -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+"’.")