Generic and less diff

This commit is contained in:
Brandon Roehl 2018-06-27 10:53:11 -05:00
parent cbe65494b7
commit f76be5b1f0

View file

@ -1,10 +1,10 @@
package main package main
import ( import (
"os"
"io"
"bytes" "bytes"
"fmt" "fmt"
"io"
"os"
"strings" "strings"
) )
@ -51,7 +51,7 @@ func maxDepth(c *Command) int {
} }
func writeLevelMapping(w io.Writer, numLevels int) { func writeLevelMapping(w io.Writer, numLevels int) {
fmt.Fprintln(w, "local -a rails_options") fmt.Fprintln(w, "local -a cmd_options")
fmt.Fprintln(w, `_arguments -C \`) fmt.Fprintln(w, `_arguments -C \`)
fmt.Fprintln(w, ` $jamf_pro_options \`) fmt.Fprintln(w, ` $jamf_pro_options \`)
for i := 1; i <= numLevels; i++ { for i := 1; i <= numLevels; i++ {
@ -94,7 +94,7 @@ func writeCommandArgsBlock(w io.Writer, c *Command) {
defer fmt.Fprintln(w, " ;;") defer fmt.Fprintln(w, " ;;")
} }
if len(flags) > 0 { if len(flags) > 0 {
fmt.Fprintln(w, " jamf_pro_options=(") fmt.Fprintln(w, " cmd_options=(")
for _, flag := range flags { for _, flag := range flags {
fmt.Fprintf(w, " %s\n", flag) fmt.Fprintf(w, " %s\n", flag)
} }