mirror of
https://github.com/spf13/cobra
synced 2024-11-25 07:07:15 +00:00
Generic and less diff
This commit is contained in:
parent
cbe65494b7
commit
f76be5b1f0
1 changed files with 4 additions and 4 deletions
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue