Home | History | Annotate | Download | only in go

Lines Matching refs:Words

249 		words := g.split(string(buf))
250 if len(words) == 0 {
253 if words[0] == "-command" {
254 g.setShorthand(words)
259 fmt.Fprintf(os.Stderr, "%s\n", strings.Join(words, " "))
264 g.exec(words)
289 // split breaks the line into words, evaluating quoted
294 var words []string
301 Words:
321 words = append(words, word)
327 continue Words
336 words = append(words, line[0:i])
340 if len(words) > 0 && g.commands[words[0]] != nil {
342 words = append(g.commands[words[0]], words[1:]...)
345 for i, word := range words {
346 words[i] = os.Expand(word, g.expandVar)
348 return words
375 func (g *Generator) setShorthand(words []string) {
377 if len(words) == 1 {
380 command := words[1]
384 g.commands[command] = words[2:len(words):len(words)] // force later append to make copy
389 func (g *Generator) exec(words []string) {
390 cmd := exec.Command(words[0], words[1:]...)
399 g.errorf("running %q: %s", words[0], err)