|
|
@ -22,7 +22,6 @@ import (
|
|
|
|
"path/filepath"
|
|
|
|
"path/filepath"
|
|
|
|
"strings"
|
|
|
|
"strings"
|
|
|
|
|
|
|
|
|
|
|
|
"github.com/pkg/errors"
|
|
|
|
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
"github.com/spf13/cobra/doc"
|
|
|
|
"github.com/spf13/cobra/doc"
|
|
|
|
"golang.org/x/text/cases"
|
|
|
|
"golang.org/x/text/cases"
|
|
|
@ -99,6 +98,6 @@ func (o *docsOptions) run(out io.Writer) error {
|
|
|
|
case "bash":
|
|
|
|
case "bash":
|
|
|
|
return o.topCmd.GenBashCompletionFile(filepath.Join(o.dest, "completions.bash"))
|
|
|
|
return o.topCmd.GenBashCompletionFile(filepath.Join(o.dest, "completions.bash"))
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
return errors.Errorf("unknown doc type %q. Try 'markdown' or 'man'", o.docTypeString)
|
|
|
|
return fmt.Errorf("unknown doc type %q. Try 'markdown' or 'man'", o.docTypeString)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|