Skip to content

Commit

Permalink
Fix language and use better version template
Browse files Browse the repository at this point in the history
  • Loading branch information
Aervyon committed Nov 10, 2023
1 parent 2ae0a44 commit 26b2686
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ var envPrefix = "FOLDCLI_"
var rootCmd = &cobra.Command{
Use: rootCmdName,
Short: "A CLI to manage Folderr installations",
Long: `A CLI to setup and manage your Folderr instance For example:
Long: `A CLI to setup and manage your Folderr instance. Get started with:
` + rootCmdName + ` init /home/folderr/folderr https://github.com/Folderr/<repo>
` + rootCmdName + ` init
` + rootCmdName + ` install
` + rootCmdName + ` setup (not added)`,
Version: "Alpha 0.0.2",
` + rootCmdName + ` init`,
Version: "Alpha 0.0.3",
CompletionOptions: cobra.CompletionOptions{
DisableDefaultCmd: true,
},
// Cleanup for dry-run commands
PersistentPostRun: func(cmd *cobra.Command, args []string) {
if dry && strings.Contains(config.directory, os.TempDir()) {
Expand Down Expand Up @@ -186,6 +187,7 @@ func printf(format string, a ...any) {

func init() {
// rootCmd.PersistentFlags().BoolVar(&dry, "dry", false, "Runs the command but does not change ANYTHING")
rootCmd.SetVersionTemplate("Folderr CLI Version: {{ .Version }}")
rootCmd.PersistentFlags().BoolVar(&dry, "dry", false, "Runs the command but does not change anything")
rootCmd.ParseFlags(os.Args)
// Here you will define your flags and configuration settings.
Expand All @@ -196,5 +198,4 @@ func init() {

// Cobra also supports local flags, which will only run
// when this action is called directly.
rootCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
}

0 comments on commit 26b2686

Please sign in to comment.