You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/_advanced/tips/shell-completion.md
+31-1Lines changed: 31 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -12,16 +12,46 @@ To enable auto-completion for Zsh, run the following command to generate the com
12
12
13
13
```bash
14
14
noir --generate-completion zsh
15
+
# #compdef noir
16
+
# _arguments \
17
+
# ....
15
18
```
16
19
17
20
Then, move the generated script to your Zsh completions directory, typically `~/.zsh/completion/`. If this directory does not exist, you may need to create it. Ensure the script is named `_noir` to follow Zsh's naming convention for completion scripts.
For Bash, generate the completion script by running:
22
29
23
30
```bash
24
31
noir --generate-completion bash
32
+
# _noir_completions() {
33
+
# local cur prev opts
34
+
# ....
35
+
```
36
+
37
+
After generating the script, move it to the appropriate directory for Bash completions. This location can vary depending on your operating system and Bash configuration, but a common path is `/etc/bash_completion.d/` for system-wide availability, or `~/.local/share/bash-completion/completions/` for a single user. Ensure the script is executable and sourced in your Bash profile.
After generating the script, move it to the appropriate directory for Bash completions. This location can vary depending on your operating system and Bash configuration, but a common path is `/etc/bash_completion.d/` for system-wide availability, or `~/.local/share/bash-completion/completions/` for a single user. Ensure the script is executable and sourced in your Bash profile.
43
+
## Fish completion
44
+
45
+
For Fish, generate the completion script by running:
46
+
47
+
```bash
48
+
noir --generate-completion fish
49
+
# function __fish_noir_needs_command
50
+
# ....
51
+
```
52
+
53
+
After generating the script, move it to the Fish completions directory, typically `~/.config/fish/completions/.` If this directory does not exist, you may need to create it. Ensure the script is named noir.fish to follow Fish's naming convention for completion scripts.
54
+
55
+
```bash
56
+
noir --generate-completion fish >~/.config/fish/completions/noir.fish
Copy file name to clipboardExpand all lines: src/options.cr
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -122,18 +122,22 @@ def run_options_parser
122
122
parser.separator "\n CONFIG:".colorize(:blue)
123
123
parser.on "--config-file ./config.yaml", "Specify the path to a configuration file in YAML format" { |var| noir_options["config_file"] =YAML::Any.new(var) }
0 commit comments