MCPcopy Create free account
hub / github.com/dropbox/dbxcli / rawArgsFirstCommand

Function rawArgsFirstCommand

cmd/help_json.go:266–284  ·  view source on GitHub ↗
(args []string)

Source from the content-addressed store, hash-verified

264}
265
266func rawArgsFirstCommand(args []string) string {
267 for i := 0; i < len(args); i++ {
268 arg := args[i]
269 switch {
270 case arg == "--":
271 return ""
272 case arg == "--output" || arg == "--as-member":
273 i++
274 continue
275 case arg == "--verbose" || arg == "-v" || strings.HasPrefix(arg, "--output=") || strings.HasPrefix(arg, "--as-member="):
276 continue
277 case strings.HasPrefix(arg, "-"):
278 continue
279 default:
280 return arg
281 }
282 }
283 return ""
284}
285
286func temporarilyClearDeprecatedCommands(root *cobra.Command) func() {
287 if root == nil {

Callers 1

rawArgsRequestJSONHelpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected