@@ -104,7 +104,7 @@ using 'caddy run' instead to keep it in the foreground.
104
104
CobraFunc : func (cmd * cobra.Command ) {
105
105
cmd .Flags ().StringP ("config" , "c" , "" , "Configuration file" )
106
106
cmd .Flags ().StringP ("adapter" , "a" , "" , "Name of config adapter to apply" )
107
- cmd .Flags ().StringP ("envfile" , "" , "" , "Environment file to load" )
107
+ cmd .Flags ().StringSliceP ("envfile" , "" , [] string {} , "Environment file(s) to load" )
108
108
cmd .Flags ().BoolP ("watch" , "w" , false , "Reload changed config file automatically" )
109
109
cmd .Flags ().StringP ("pidfile" , "" , "" , "Path of file to which to write process ID" )
110
110
cmd .RunE = WrapCommandFuncForCobra (cmdStart )
@@ -150,7 +150,7 @@ option in a local development environment.
150
150
CobraFunc : func (cmd * cobra.Command ) {
151
151
cmd .Flags ().StringP ("config" , "c" , "" , "Configuration file" )
152
152
cmd .Flags ().StringP ("adapter" , "a" , "" , "Name of config adapter to apply" )
153
- cmd .Flags ().StringP ("envfile" , "" , "" , "Environment file to load" )
153
+ cmd .Flags ().StringSliceP ("envfile" , "" , [] string {} , "Environment file(s) to load" )
154
154
cmd .Flags ().BoolP ("environ" , "e" , false , "Print environment" )
155
155
cmd .Flags ().BoolP ("resume" , "r" , false , "Use saved config, if any (and prefer over --config file)" )
156
156
cmd .Flags ().BoolP ("watch" , "w" , false , "Watch config file for changes and reload it automatically" )
@@ -301,7 +301,7 @@ the KEY=VALUE format will be loaded into the Caddy process.
301
301
CobraFunc : func (cmd * cobra.Command ) {
302
302
cmd .Flags ().StringP ("config" , "c" , "" , "Input configuration file" )
303
303
cmd .Flags ().StringP ("adapter" , "a" , "" , "Name of config adapter" )
304
- cmd .Flags ().StringP ("envfile" , "" , "" , "Environment file to load" )
304
+ cmd .Flags ().StringSliceP ("envfile" , "" , [] string {} , "Environment file(s) to load" )
305
305
cmd .RunE = WrapCommandFuncForCobra (cmdValidateConfig )
306
306
},
307
307
})
@@ -402,7 +402,7 @@ latest versions. EXPERIMENTAL: May be changed or removed.
402
402
Short : "Adds Caddy packages (EXPERIMENTAL)" ,
403
403
Long : `
404
404
Downloads an updated Caddy binary with the specified packages (module/plugin)
405
- added. Retains existing packages. Returns an error if the any of packages are
405
+ added. Retains existing packages. Returns an error if the any of packages are
406
406
already included. EXPERIMENTAL: May be changed or removed.
407
407
` ,
408
408
CobraFunc : func (cmd * cobra.Command ) {
@@ -417,8 +417,8 @@ already included. EXPERIMENTAL: May be changed or removed.
417
417
Usage : "<packages...>" ,
418
418
Short : "Removes Caddy packages (EXPERIMENTAL)" ,
419
419
Long : `
420
- Downloads an updated Caddy binaries without the specified packages (module/plugin).
421
- Returns an error if any of the packages are not included.
420
+ Downloads an updated Caddy binaries without the specified packages (module/plugin).
421
+ Returns an error if any of the packages are not included.
422
422
EXPERIMENTAL: May be changed or removed.
423
423
` ,
424
424
CobraFunc : func (cmd * cobra.Command ) {
@@ -464,40 +464,40 @@ argument of --directory. If the directory does not exist, it will be created.
464
464
Use : "completion [bash|zsh|fish|powershell]" ,
465
465
Short : "Generate completion script" ,
466
466
Long : fmt .Sprintf (`To load completions:
467
-
467
+
468
468
Bash:
469
-
469
+
470
470
$ source <(%[1]s completion bash)
471
-
471
+
472
472
# To load completions for each session, execute once:
473
473
# Linux:
474
474
$ %[1]s completion bash > /etc/bash_completion.d/%[1]s
475
475
# macOS:
476
476
$ %[1]s completion bash > $(brew --prefix)/etc/bash_completion.d/%[1]s
477
-
477
+
478
478
Zsh:
479
-
479
+
480
480
# If shell completion is not already enabled in your environment,
481
481
# you will need to enable it. You can execute the following once:
482
-
482
+
483
483
$ echo "autoload -U compinit; compinit" >> ~/.zshrc
484
-
484
+
485
485
# To load completions for each session, execute once:
486
486
$ %[1]s completion zsh > "${fpath[1]}/_%[1]s"
487
-
487
+
488
488
# You will need to start a new shell for this setup to take effect.
489
-
489
+
490
490
fish:
491
-
491
+
492
492
$ %[1]s completion fish | source
493
-
493
+
494
494
# To load completions for each session, execute once:
495
495
$ %[1]s completion fish > ~/.config/fish/completions/%[1]s.fish
496
-
496
+
497
497
PowerShell:
498
-
498
+
499
499
PS> %[1]s completion powershell | Out-String | Invoke-Expression
500
-
500
+
501
501
# To load completions for every new session, run:
502
502
PS> %[1]s completion powershell > %[1]s.ps1
503
503
# and source this file from your PowerShell profile.
0 commit comments