From 928f20b4bd5c2a8df7fa96b767accddfc9d79d5a Mon Sep 17 00:00:00 2001 From: Matt Bell Date: Wed, 19 Nov 2014 01:44:51 -0800 Subject: [PATCH] core/commands: pin ls: Default type to 'direct' --- core/commands/pin.go | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/core/commands/pin.go b/core/commands/pin.go index 656bc321d..a085fe51c 100644 --- a/core/commands/pin.go +++ b/core/commands/pin.go @@ -107,11 +107,22 @@ var listPinCmd = &cmds.Command{ ShortDescription: ` Returns a list of hashes of objects being pinned. Objects that are indirectly or recursively pinned are not included in the list. +`, + LongDescription: ` +Returns a list of hashes of objects being pinned. Objects that are indirectly +or recursively pinned are not included in the list. + +Use --type= to specify the type of pinned keys to list. Valid values are: + * "direct" + * "indirect" + * "recursive" + * "all" +(Defaults to "direct") `, }, Options: []cmds.Option{ - cmds.StringOption("type", "t", "The type of pinned keys to list. Can be \"direct\", \"indirect\", \"recursive\", or \"all\""), + cmds.StringOption("type", "t", "The type of pinned keys to list. Can be \"direct\", \"indirect\", \"recursive\", or \"all\". Defaults to \"direct\""), }, Run: func(req cmds.Request) (interface{}, error) { n, err := req.Context().GetNode() @@ -124,7 +135,7 @@ or recursively pinned are not included in the list. return nil, err } if !found { - typeStr = "all" + typeStr = "direct" } if typeStr != "all" && typeStr != "direct" && typeStr != "indirect" && typeStr != "recursive" {