Skip to content

Commit 4af5630

Browse files
committed
update docs
1 parent e83616d commit 4af5630

File tree

4 files changed

+84
-141
lines changed

4 files changed

+84
-141
lines changed

book/src/SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Installation
66

77
- [Installation Methods](./installation/installation-methods.md)
8-
- [Shell Integration](./installation/shell-integration.md)
8+
- [Shell Integrations](./installation/shell-integrations.md)
99

1010
# Usage
1111

book/src/installation/shell-integration.md

Lines changed: 0 additions & 139 deletions
This file was deleted.
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Shell Integrations
2+
3+
## Completions
4+
5+
cutler supports built-in shell completion for your ease of access for a variety of system shells, including Bash, Zsh, Powershell etc. Below you will find setup instructions to enable completions automatically for every new shell session.
6+
7+
> **NOTE:** If you have installed cutler using Homebrew, the shell completion will automatically be installed. Just restart your shell after initial installation.
8+
9+
### Bash
10+
11+
Run the command below:
12+
13+
```bash
14+
eval "$(cutler completion bash)" > .bashrc # or .bash_profile
15+
```
16+
17+
Then restart your shell or run:
18+
19+
```bash
20+
source ~/.bashrc
21+
```
22+
23+
### Zsh
24+
25+
1. Create a directory for custom completions (if it doesn't exist):
26+
27+
```sh
28+
mkdir -p ~/.zfunc
29+
```
30+
31+
2. Generate the completion script and move it:
32+
33+
```sh
34+
cutler completion zsh > ~/.zfunc/_cutler
35+
```
36+
37+
3. Add the following to your `~/.zshrc`:
38+
39+
```sh
40+
fpath=(~/.zfunc $fpath)
41+
autoload -U compinit && compinit
42+
```
43+
44+
4. Restart your shell or run:
45+
46+
```sh
47+
source ~/.zshrc
48+
```
49+
50+
### Fish
51+
52+
Add the completion script to your fish configuration directory:
53+
54+
```fish
55+
cutler completion fish > ~/.config/fish/completions/cutler.fish
56+
```
57+
58+
Restart your shell or open a new fish session.
59+
60+
### Elvish
61+
62+
Add the following to your Elvish configuration file (usually `~/.elvish/rc.elv`):
63+
64+
```elvish
65+
eval (cutler completion elvish)
66+
```
67+
68+
Restart your shell or source your config file.
69+
70+
### PowerShell
71+
72+
Add the following to your PowerShell profile (you can find your profile path with `$PROFILE`):
73+
74+
```powershell
75+
cutler completion powershell | Out-String | Invoke-Expression
76+
```
77+
78+
Restart your shell or run:
79+
80+
```powershell
81+
. $PROFILE
82+
```

mise.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tasks.serve]
22
description = "Serves the book locally"
3-
run = "cd book && mdbook serve --open"
3+
run = "mdbook serve book --open"
44

55
[tools]
66
mdbook = "latest"

0 commit comments

Comments
 (0)