diff --git a/core/commands/pin.go b/core/commands/pin.go index c3cbb34b1f87..e6fc4032f532 100644 --- a/core/commands/pin.go +++ b/core/commands/pin.go @@ -180,7 +180,7 @@ var rmPinCmd = &cmds.Command{ Tagline: "Remove pinned objects from local storage.", ShortDescription: ` Removes the pin from the given object allowing it to be garbage -collected if needed. (By default, recursively. Use -r=false for direct pins.) +collected if needed. By default, removes recursive pins. `, }, @@ -188,8 +188,7 @@ collected if needed. (By default, recursively. Use -r=false for direct pins.) cmdkit.StringArg("pin-path", true, true, "Pin paths").EnableStdin(), }, Options: []cmdkit.Option{ - cmdkit.BoolOption("recursive", "r", "Recursively unpin the object linked to by the specified object(s).").WithDefault(true), - cmdkit.BoolOption("explain", "e", "Check for other pinned objects which could cause specified object(s) to be indirectly pinned").WithDefault(false), + cmdkit.BoolOption("direct", "d", "Unpins a direct pin").WithDefault(false), }, Type: PinOutput{}, Run: func(req cmds.Request, res cmds.Response) { @@ -200,7 +199,8 @@ collected if needed. (By default, recursively. Use -r=false for direct pins.) } // set recursive flag - recursive, _, err := req.Option("recursive").Bool() + direct, _, err := req.Option("direct").Bool() + recursive := !direct if err != nil { res.SetError(err, cmdkit.ErrNormal) return