Caddy(8)
caddy-completion π
okay so bestie, welcome to the caddy-completion page β she's giving utility, she's giving quality-of-life, she's the little helper that makes your shell finish your sentences for you. β¨
This is part of the Caddy manual (that's the Caddy(8) situation, iykyk). Let's get into it.
πΈ NAME πΈ
caddy-completion β Generate completion script
Like. That's it. That's the whole job. And she ATE. π
π¦ SYNOPSIS π¦
caddy completion [bash|zsh|fish|powershell]
Pick your shell, get your completion script. Simple as. π
β¨ DESCRIPTION β¨
π To load completions:
Okay so this is the part where I hold your hand, because there are four different shells and each one wants to be special about it. Not me being dramatic, that's just genuinely how it is. π
π§ Bash:
$ source <(caddy completion bash)
# To load completions for each session, execute once:
# Linux:
$ caddy completion bash > /etc/bash_completion.d/caddy
# macOS:
$ caddy completion bash > $(brew --prefix)/etc/bash_completion.d/caddy
So the source <(...) line is your lil "just for right now" vibe, and then the session-wide one is the "make it permanent bestie" move β and yeah, Linux and macOS get different paths because of course they do. π
πΈ 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:
$ caddy completion zsh > "${fpath[1]}/_caddy"
# You will need to start a new shell for this setup to take effect.
Read the comments, they're doing the heavy lifting here. If completion isn't already on in your setup you gotta turn it on first β that echo line appends the autoload -U compinit; compinit to your ~/.zshrc and you only need to run it once. Then you drop the completion into ${fpath[1]}/_caddy. And heads up: you're gonna need to start a new shell for this setup to actually take effect. No, refreshing won't do it. She needs a fresh start. π
π fish:
$ caddy completion fish | source
# To load completions for each session, execute once:
$ caddy completion fish > ~/.config/fish/completions/caddy.fish
Piping straight into source = instant gratification. Redirecting to ~/.config/fish/completions/caddy.fish = forever girl. π
β‘ PowerShell:
PS> caddy completion powershell | Out-String | Invoke-Expression
# To load completions for every new session, run:
PS> caddy completion powershell > caddy.ps1
# and source this file from your PowerShell profile.
Same energy, Windows edition. Pipe through Out-String then Invoke-Expression for the quick hit, or write it out to caddy.ps1 and source that file from your PowerShell profile so it shows up every single new session. π«Ά
π OPTIONS π
-h,--help[=false]β help for completion. She's the "wait what does this do again" button. Lowkey iconic. π
β SEE ALSO β
caddy(8)β the main character. Go read her next, fr fr. π
π HISTORY π
1-Jan-0001 Auto generated by spf13/cobra
Yes bestie, that date really does say 1-Jan-0001. That's not a typo, that's just what the original says. Some things are simply beyond our comprehension and we must respect them. π
and that's the page!! this whole thing was auto generated by spf13/cobra, dated Jan 0001, and it's page Caddy(8) of the Caddy manual. go forth, get your completions loaded, and may your Tab key always know exactly what you meant. mwah. πβ¨π¦π
π¦ where this page comes from
- ubuntu stonking: caddy 2.11.4-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms