code: func determinePath(ctx *cli.Context, path string) (*pathexp.PathExp, *string, error) {
  	// First try and use the cli args as a full path. it should override any
  	// options.
  	idx := strings.LastIndex(path, "/")
  	name := path[idx+1:]
  
  	// It looks like the user gave a path expression. use that instead of flags.
  	var pe *pathexp.PathExp
  	var err error
  	if idx != -1 {
  		path := path[:idx]
  		pe, err = parsePathExp(path)
  		if err != nil {
  			return nil, nil, errs.NewExitError(err.Error())
  		}
  		if name == "*" {
  			return nil, nil, errs.NewExitError("Secret name cannot be wildcard")
  		}
  	} else {
  		pe, err = determinePathFromFlags(ctx)
  		if err != nil {
  			return nil, nil, err
  		}
  	}
  
  	return pe, &name, nil
  }
docs: // determinePath returns a PathExp and a possible credential name if a full
  // path was provided.