Debian Codegraph @

docs/usage/cli/completion/index.md

raw
1 # Completion
2
3 ## Overview
4
5 The `completion` command generates a completion script for the specified shell.
6
7 ## Usage
8
9 ```bash title="Completion Command Syntax"
10 shoutrrr completion [SHELL]
11 ```
12
13 ## Available Options
14
15 | Shell | Description |
16 |--------------|---------------------------------------------------|
17 | `bash` | Generate the completion script for the Bash shell |
18 | `fish` | Generate the completion script for the Fish shell |
19 | `powershell` | Generate the completion script for PowerShell |
20 | `zsh` | Generate the completion script for the ZSH shell |
21
22 ## Completion Script Installation
23
24 ### Bash
25
26 1. Save the completion script depending on your operating system and Bash configuration:
27
28 ```bash
29 shoutrrr completions bash | sudo tee /usr/share/bash-completion/completions/shoutrrr >/dev/null
30 ```
31
32 2. Reload the Bash configuration to make it available to the current shell session:
33
34 ```bash
35 source ~/.bashrc
36 ```
37
38 ### Windows PowerShell
39
40 1. Save the completion script to a location of your preference:
41
42 ```powershell
43 Invoke-Expression "shoutrrr.exe completions powershell | Out-File -FilePath $HOME\Documents\PowerShell\Scripts\shoutrrr_completion.ps1"
44 ```
45
46 2. Invoke the completion script within your PowerShell profile:
47
48 ```powershell
49 Add-Content -Path $PROFILE -Value '. $HOME\Documents\PowerShell\Scripts\shoutrrr.ps1'
50 ```
51
52 3. Reload your PowerShell profile to invoke the change:
53
54 ```powershell
55 . $PROFILE
56 ```