code: func Document(cfg *Config, word *syntax.Word) (string, error) {
  	if word == nil {
  		return "", nil
  	}
  	cfg = prepareConfig(cfg)
  	field, err := cfg.wordField(word.Parts, quoteDouble)
  	if err != nil {
  		return "", err
  	}
  	return cfg.fieldJoin(field), nil
  }
docs: // Document expands a single shell word as if it were within double quotes. It
  // is simlar to Literal, but without brace expansion, tilde expansion, and
  // globbing.
  //
  // The config specifies shell expansion options; nil behaves the same as an
  // empty config.