diff --git a/ls-main.go b/ls-main.go index 9a6a9ffc..7656a909 100644 --- a/ls-main.go +++ b/ls-main.go @@ -65,7 +65,7 @@ EXAMPLES: [2015-05-19 17:28:22 PDT] 41B 本語.md 7. List incompletely uploaded files for a given bucket - $ mc ls incomplete s3/miniocloud + $ mc ls s3/miniocloud incomplete [2015-10-19 22:28:02 PDT] 0B bin/ `, @@ -126,8 +126,8 @@ func mainList(ctx *cli.Context) { var targetURLs []string var err *probe.Error - if args.First() == "incomplete" { - targetURLs, err = args2URLs(args.Tail()) + if args.Last() == "incomplete" { + targetURLs, err = args2URLs(args.Head()) fatalIf(err.Trace(args...), "One or more unknown URL types passed.") for _, targetURL := range targetURLs { // if recursive strip off the "..." diff --git a/vendor/github.com/minio/cli/app.go b/vendor/github.com/minio/cli/app.go index 5ef854de..f0df8ef2 100644 --- a/vendor/github.com/minio/cli/app.go +++ b/vendor/github.com/minio/cli/app.go @@ -19,8 +19,10 @@ import ( type App struct { // The name of the program. Defaults to os.Args[0] Name string - // Description of the program. + // Usage of the program. Usage string + // Description of the program. + Description string // Version of the program Version string // List of commands to execute diff --git a/vendor/github.com/minio/cli/context.go b/vendor/github.com/minio/cli/context.go index cf04dbfe..8b03597e 100644 --- a/vendor/github.com/minio/cli/context.go +++ b/vendor/github.com/minio/cli/context.go @@ -193,6 +193,15 @@ func (a Args) Tail() Args { return []string{} } +// Head - Return the rest of the arguments (not the last one) +// or else an empty string slice +func (a Args) Head() Args { + if len(a) == 1 { + return a + } + return []string(a)[:len(a)-1] +} + // Present - Checks if there are any arguments present func (a Args) Present() bool { return len(a) != 0 diff --git a/vendor/vendor.json b/vendor/vendor.json index 076ebd2f..bc6e4781 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -24,8 +24,8 @@ }, { "path": "github.com/minio/cli", - "revision": "20bcbfd3118387fcf8e29dd3c45bff0c13de2a01", - "revisionTime": "2015-09-05T22:26:54-07:00" + "revision": "deb83e228f8fd55ca51942e0de0ec09665b3f63c", + "revisionTime": "2015-11-06T16:14:14-08:00" }, { "path": "github.com/minio/minio-go",