code: func Params(args ...string) func(*Runner) error {
  	return func(r *Runner) error {
  		onlyFlags := true
  		for len(args) > 0 {
  			arg := args[0]
  			if arg == "" || (arg[0] != '-' && arg[0] != '+') {
  				onlyFlags = false
  				break
  			}
  			if arg == "--" {
  				onlyFlags = false
  				args = args[1:]
  				break
  			}
  			enable := arg[0] == '-'
  			var opt *bool
  			if flag := arg[1:]; flag == "o" {
  				args = args[1:]
  				if len(args) == 0 && enable {
  					for i, opt := range &shellOptsTable {
  						r.printOptLine(opt.name, r.opts[i])
  					}
  					break
  				}
  				if len(args) == 0 && !enable {
  					for i, opt := range &shellOptsTable {
  						setFlag := "+o"
  						if r.opts[i] {
  							setFlag = "-o"
  						}
  						r.outf("set %s %s\n", setFlag, opt.name)
  					}
  					break
  				}
  				opt = r.optByName(args[0], false)
  			} else {
  				opt = r.optByFlag(flag)
  			}
  			if opt == nil {
  				return fmt.Errorf("invalid option: %q", arg)
  			}
  			*opt = enable
  			args = args[1:]
  		}
  		if !onlyFlags {
  			// If "--" wasn't given and there were zero arguments,
  			// we don't want to override the current parameters.
  			r.Params = args
  		}
  		return nil
  	}
  }
docs: // Params populates the shell options and parameters. For example, Params("-e",
  // "--", "foo") will set the "-e" option and the parameters ["foo"], and
  // Params("+e") will unset the "-e" option and leave the parameters untouched.
  //
  // This is similar to what the interpreter's "set" builtin does.