code: func (o *AttachOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error {
  	var err error
  	o.Namespace, _, err = f.ToRawKubeConfigLoader().Namespace()
  	if err != nil {
  		return err
  	}
  
  	o.AttachablePodFn = polymorphichelpers.AttachablePodForObjectFn
  
  	o.GetPodTimeout, err = cmdutil.GetPodRunningTimeoutFlag(cmd)
  	if err != nil {
  		return cmdutil.UsageErrorf(cmd, err.Error())
  	}
  
  	o.Builder = f.NewBuilder
  	o.Resources = args
  	o.restClientGetter = f
  
  	fullCmdName := ""
  	cmdParent := cmd.Parent()
  	if cmdParent != nil {
  		fullCmdName = cmdParent.CommandPath()
  	}
  	if len(fullCmdName) > 0 && cmdutil.IsSiblingCommandExists(cmd, "describe") {
  		o.SuggestedCmdUsage = fmt.Sprintf("Use '%s describe pod/%s -n %s' to see all of the containers in this pod.", fullCmdName, o.PodName, o.Namespace)
  	}
  
  	config, err := f.ToRESTConfig()
  	if err != nil {
  		return err
  	}
  	o.Config = config
  
  	if o.CommandName == "" {
  		o.CommandName = cmd.CommandPath()
  	}
  
  	return nil
  }
docs: // Complete verifies command line arguments and loads data from the command environment