diff options
author | Matthew Holt <mholt@users.noreply.github.com> | 2022-09-06 14:19:58 -0600 |
---|---|---|
committer | Matthew Holt <mholt@users.noreply.github.com> | 2022-09-06 14:19:58 -0600 |
commit | 1c9c8f6a13f99817cb35a9b100287da81255be21 (patch) | |
tree | dd6f66700d64afa118ca686dd996358120c62ad8 /cmd | |
parent | 8cc8f9fddd2ea717633528322e1bef938bee2415 (diff) |
cmd: Enhance some help text
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/commands.go | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/cmd/commands.go b/cmd/commands.go index 4ae3a5b..e1e7a53 100644 --- a/cmd/commands.go +++ b/cmd/commands.go @@ -200,6 +200,19 @@ config file; otherwise the default is assumed.`, Name: "version", Func: cmdVersion, Short: "Prints the version", + Long: ` +Prints the version of this Caddy binary. + +Version information must be embedded into the binary at compile-time in +order for Caddy to display anything useful with this command. If Caddy +is built from within a version control repository, the Go command will +embed the revision hash if available. However, if Caddy is built in the +way specified by our online documentation (or by using xcaddy), more +detailed version information is printed as given by Go modules. + +For more details about the full version string, see the Go module +documentation: https://go.dev/doc/modules/version-numbers +`, }) RegisterCommand(Command{ @@ -226,6 +239,24 @@ config file; otherwise the default is assumed.`, Name: "environ", Func: cmdEnviron, Short: "Prints the environment", + Long: ` +Prints the environment as seen by this Caddy process. + +The environment includes variables set in the system. If your Caddy +configuration uses environment variables (e.g. "{env.VARIABLE}") then +this command can be useful for verifying that the variables will have +the values you expect in your config. + +Note that environments may be different depending on how you run Caddy. +Environments for Caddy instances started by service managers such as +systemd are often different than the environment inherited from your +shell or terminal. + +You can also print the environment the same time you use "caddy run" +by adding the "--environ" flag. + +Environments may contain sensitive data. +`, }) RegisterCommand(Command{ @@ -367,9 +398,11 @@ EXPERIMENTAL: May be changed or removed. Usage: "--directory <path>", Short: "Generates the manual pages for Caddy commands", Long: ` -Generates the manual pages for Caddy commands into the designated directory tagged into section 8 (System Administration). +Generates the manual pages for Caddy commands into the designated directory +tagged into section 8 (System Administration). -The manual page files are generated into the directory specified by the argument of --directory. If the directory does not exist, it will be created. +The manual page files are generated into the directory specified by the +argument of --directory. If the directory does not exist, it will be created. `, Flags: func() *flag.FlagSet { fs := flag.NewFlagSet("manpage", flag.ExitOnError) |