1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
|
From: Peymaneh <peymaneh@posteo.net>
Date: Mon, 2 Jan 2023 21:33:36 +0100
Subject: Remove obsolote subcommands
forwarded: not-needed
---
cmd/commands.go | 76 +++++++++++----------------------------------------------
1 file changed, 14 insertions(+), 62 deletions(-)
--- a/cmd/commands.go
+++ b/cmd/commands.go
@@ -330,54 +330,6 @@
})
RegisterCommand(Command{
- Name: "upgrade",
- Func: cmdUpgrade,
- Short: "Upgrade Caddy (EXPERIMENTAL)",
- Long: `
-Downloads an updated Caddy binary with the same modules/plugins at the
-latest versions. EXPERIMENTAL: May be changed or removed.`,
- Flags: func() *flag.FlagSet {
- fs := flag.NewFlagSet("upgrade", flag.ExitOnError)
- fs.Bool("keep-backup", false, "Keep the backed up binary, instead of deleting it")
- return fs
- }(),
- })
-
- RegisterCommand(Command{
- Name: "add-package",
- Func: cmdAddPackage,
- Usage: "<packages...>",
- Short: "Adds Caddy packages (EXPERIMENTAL)",
- Long: `
-Downloads an updated Caddy binary with the specified packages (module/plugin)
-added. Retains existing packages. Returns an error if the any of packages are
-already included. EXPERIMENTAL: May be changed or removed.
-`,
- Flags: func() *flag.FlagSet {
- fs := flag.NewFlagSet("add-package", flag.ExitOnError)
- fs.Bool("keep-backup", false, "Keep the backed up binary, instead of deleting it")
- return fs
- }(),
- })
-
- RegisterCommand(Command{
- Name: "remove-package",
- Func: cmdRemovePackage,
- Usage: "<packages...>",
- Short: "Removes Caddy packages (EXPERIMENTAL)",
- Long: `
-Downloads an updated Caddy binaries without the specified packages (module/plugin).
-Returns an error if any of the packages are not included.
-EXPERIMENTAL: May be changed or removed.
-`,
- Flags: func() *flag.FlagSet {
- fs := flag.NewFlagSet("remove-package", flag.ExitOnError)
- fs.Bool("keep-backup", false, "Keep the backed up binary, instead of deleting it")
- return fs
- }(),
- })
-
- RegisterCommand(Command{
Name: "manpage",
Func: func(fl Flags) (int, error) {
dir := strings.TrimSpace(fl.String("directory"))
@@ -416,40 +368,40 @@
Use: "completion [bash|zsh|fish|powershell]",
Short: "Generate completion script",
Long: fmt.Sprintf(`To load completions:
-
+
Bash:
-
+
$ source <(%[1]s completion bash)
-
+
# To load completions for each session, execute once:
# Linux:
$ %[1]s completion bash > /etc/bash_completion.d/%[1]s
# macOS:
$ %[1]s completion bash > $(brew --prefix)/etc/bash_completion.d/%[1]s
-
+
Zsh:
-
+
# If shell completion is not already enabled in your environment,
# you will need to enable it. You can execute the following once:
-
+
$ echo "autoload -U compinit; compinit" >> ~/.zshrc
-
+
# To load completions for each session, execute once:
$ %[1]s completion zsh > "${fpath[1]}/_%[1]s"
-
+
# You will need to start a new shell for this setup to take effect.
-
+
fish:
-
+
$ %[1]s completion fish | source
-
+
# To load completions for each session, execute once:
$ %[1]s completion fish > ~/.config/fish/completions/%[1]s.fish
-
+
PowerShell:
-
+
PS> %[1]s completion powershell | Out-String | Invoke-Expression
-
+
# To load completions for every new session, run:
PS> %[1]s completion powershell > %[1]s.ps1
# and source this file from your PowerShell profile.
|