Skip to content

Commit 9cb6156

Browse files
authored
Merge pull request #3108 from carapace-sh/mdbook-updates-v0.5.1
mdbook: updates from v0.5.1
2 parents 4fce9d8 + 4bc570f commit 9cb6156

File tree

17 files changed

+171
-25
lines changed

17 files changed

+171
-25
lines changed

completers/common/mdbook_completer/cmd/build.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ func init() {
1515
carapace.Gen(buildCmd).Standalone()
1616

1717
buildCmd.Flags().StringP("dest-dir", "d", "", "Output directory for the book")
18-
buildCmd.Flags().BoolP("help", "h", false, "Prints help information")
18+
buildCmd.Flags().BoolP("help", "h", false, "Print help")
1919
buildCmd.Flags().BoolP("open", "o", false, "Opens the compiled book in a web browser")
20-
buildCmd.Flags().BoolP("version", "V", false, "Prints version information")
20+
buildCmd.Flags().BoolP("version", "V", false, "Print version")
2121
rootCmd.AddCommand(buildCmd)
2222

2323
carapace.Gen(buildCmd).FlagCompletion(carapace.ActionMap{

completers/common/mdbook_completer/cmd/clean.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ func init() {
1515
carapace.Gen(cleanCmd).Standalone()
1616

1717
cleanCmd.Flags().StringP("dest-dir", "d", "", "Output directory for the book")
18-
cleanCmd.Flags().BoolP("help", "h", false, "Prints help information")
19-
cleanCmd.Flags().BoolP("version", "V", false, "Prints version information")
18+
cleanCmd.Flags().BoolP("help", "h", false, "Print help")
19+
cleanCmd.Flags().BoolP("version", "V", false, "Print version")
2020
rootCmd.AddCommand(cleanCmd)
2121

2222
carapace.Gen(cleanCmd).FlagCompletion(carapace.ActionMap{

completers/common/mdbook_completer/cmd/completions.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ var completionsCmd = &cobra.Command{
1414
func init() {
1515
carapace.Gen(completionsCmd).Standalone()
1616

17-
completionsCmd.Flags().BoolP("help", "h", false, "Prints help information")
18-
completionsCmd.Flags().BoolP("version", "V", false, "Prints version information")
17+
completionsCmd.Flags().BoolP("help", "h", false, "Print help")
18+
completionsCmd.Flags().BoolP("version", "V", false, "Print version")
1919
rootCmd.AddCommand(completionsCmd)
2020

2121
carapace.Gen(completionsCmd).PositionalCompletion(

completers/common/mdbook_completer/cmd/help.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
var helpCmd = &cobra.Command{
99
Use: "help",
10-
Short: "Prints this message or the help of the given subcommand(s)",
10+
Short: "Print this message or the help of the given subcommand(s)",
1111
Run: func(cmd *cobra.Command, args []string) {},
1212
}
1313

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package cmd
2+
3+
import (
4+
"github.com/carapace-sh/carapace"
5+
"github.com/spf13/cobra"
6+
)
7+
8+
var help_buildCmd = &cobra.Command{
9+
Use: "build",
10+
Short: "Builds a book from its markdown files",
11+
Run: func(cmd *cobra.Command, args []string) {},
12+
}
13+
14+
func init() {
15+
carapace.Gen(help_buildCmd).Standalone()
16+
17+
helpCmd.AddCommand(help_buildCmd)
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package cmd
2+
3+
import (
4+
"github.com/carapace-sh/carapace"
5+
"github.com/spf13/cobra"
6+
)
7+
8+
var help_cleanCmd = &cobra.Command{
9+
Use: "clean",
10+
Short: "Deletes a built book",
11+
Run: func(cmd *cobra.Command, args []string) {},
12+
}
13+
14+
func init() {
15+
carapace.Gen(help_cleanCmd).Standalone()
16+
17+
helpCmd.AddCommand(help_cleanCmd)
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package cmd
2+
3+
import (
4+
"github.com/carapace-sh/carapace"
5+
"github.com/spf13/cobra"
6+
)
7+
8+
var help_completionsCmd = &cobra.Command{
9+
Use: "completions",
10+
Short: "Generate shell completions for your shell to stdout",
11+
Run: func(cmd *cobra.Command, args []string) {},
12+
}
13+
14+
func init() {
15+
carapace.Gen(help_completionsCmd).Standalone()
16+
17+
helpCmd.AddCommand(help_completionsCmd)
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package cmd
2+
3+
import (
4+
"github.com/carapace-sh/carapace"
5+
"github.com/spf13/cobra"
6+
)
7+
8+
var help_helpCmd = &cobra.Command{
9+
Use: "help",
10+
Short: "Print this message or the help of the given subcommand(s)",
11+
Run: func(cmd *cobra.Command, args []string) {},
12+
}
13+
14+
func init() {
15+
carapace.Gen(help_helpCmd).Standalone()
16+
17+
helpCmd.AddCommand(help_helpCmd)
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package cmd
2+
3+
import (
4+
"github.com/carapace-sh/carapace"
5+
"github.com/spf13/cobra"
6+
)
7+
8+
var help_initCmd = &cobra.Command{
9+
Use: "init",
10+
Short: "Creates the boilerplate structure and files for a new book",
11+
Run: func(cmd *cobra.Command, args []string) {},
12+
}
13+
14+
func init() {
15+
carapace.Gen(help_initCmd).Standalone()
16+
17+
helpCmd.AddCommand(help_initCmd)
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package cmd
2+
3+
import (
4+
"github.com/carapace-sh/carapace"
5+
"github.com/spf13/cobra"
6+
)
7+
8+
var help_serveCmd = &cobra.Command{
9+
Use: "serve",
10+
Short: "Serves a book at http://localhost:3000, and rebuilds it on changes",
11+
Run: func(cmd *cobra.Command, args []string) {},
12+
}
13+
14+
func init() {
15+
carapace.Gen(help_serveCmd).Standalone()
16+
17+
helpCmd.AddCommand(help_serveCmd)
18+
}

0 commit comments

Comments
 (0)