Skip to content

Commit

Permalink
Add env variables to args help
Browse files Browse the repository at this point in the history
  • Loading branch information
F1bonacc1 committed Feb 27, 2023
1 parent ef3ab85 commit 4e35715
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/cmd/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ func init() {
processCmd.AddCommand(logsCmd)

logsCmd.Flags().BoolVarP(&follow, "follow", "f", false, "Follow log output")
logsCmd.Flags().IntVarP(&tailLength, "tail", "n", math.MaxInt, "Number of lines to show from the end of the logs (default - all)")
logsCmd.Flags().IntVarP(&tailLength, "tail", "n", math.MaxInt, "Number of lines to show from the end of the logs")
}
6 changes: 3 additions & 3 deletions src/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ func init() {
FileNames: []string{},
}

rootCmd.Flags().BoolVarP(&isTui, "tui", "t", true, "disable tui (-t=false)")
rootCmd.PersistentFlags().IntVarP(&port, "port", "p", getPortDefault(), "port number")
rootCmd.Flags().StringArrayVarP(&opts.FileNames, "config", "f", getConfigDefault(), "path to config files to load")
rootCmd.Flags().BoolVarP(&isTui, "tui", "t", true, "disable tui (-t=false) (env: PC_DISABLE_TUI)")
rootCmd.PersistentFlags().IntVarP(&port, "port", "p", getPortDefault(), "port number (env: PC_PORT_NUM)")
rootCmd.Flags().StringArrayVarP(&opts.FileNames, "config", "f", getConfigDefault(), "path to config files to load (env: PC_CONFIG_FILES)")
}

func getTuiDefault() bool {
Expand Down
4 changes: 2 additions & 2 deletions src/cmd/up.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ will start them and their dependencies only`,
func init() {
rootCmd.AddCommand(upCmd)

upCmd.Flags().BoolVarP(&isTui, "tui", "t", true, "disable tui (-t=false)")
upCmd.Flags().BoolVarP(&isTui, "tui", "t", true, "disable tui (-t=false) (env: PC_DISABLE_TUI)")
upCmd.Flags().BoolVarP(&noDeps, "no-deps", "", false, "don't start dependent processes")
upCmd.Flags().StringArrayVarP(&opts.FileNames, "config", "f", getConfigDefault(), "path to config files to load")
upCmd.Flags().StringArrayVarP(&opts.FileNames, "config", "f", getConfigDefault(), "path to config files to load (env: PC_CONFIG_FILES)")

}

0 comments on commit 4e35715

Please sign in to comment.