Skip to content

Commit 62685a2

Browse files
authored
Add README completion instructions (#312)
1 parent 8ea804c commit 62685a2

File tree

1 file changed

+81
-0
lines changed

1 file changed

+81
-0
lines changed

README.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,87 @@ See the [nix package directory](https://search.nixos.org/packages?channel=unstab
9090

9191
**Note:** Do you want this on another package manager? [Create an issue](https://github.com/joshmedeski/sesh/issues/new) and let me know!
9292

93+
## Shell Completion
94+
95+
Sesh supports shell completion (tab completion) for Bash, Zsh, Fish, and PowerShell. This helps you discover commands, flags, and arguments by pressing the Tab key.
96+
97+
<details>
98+
<summary>Bash</summary>
99+
100+
```sh
101+
# Generate completion script
102+
sesh completion bash > sesh-completion.bash
103+
104+
# Install system-wide (recommended)
105+
sudo cp sesh-completion.bash /etc/bash_completion.d/
106+
107+
# Or install user-only
108+
mkdir -p ~/.local/share/bash-completion/completions
109+
cp sesh-completion.bash ~/.local/share/bash-completion/completions/sesh
110+
111+
# Reload your shell
112+
source ~/.bashrc
113+
```
114+
115+
</details>
116+
117+
<details>
118+
<summary>Zsh</summary>
119+
120+
```sh
121+
# Generate completion script
122+
sesh completion zsh > _sesh
123+
124+
# Install system-wide (recommended)
125+
sudo mkdir -p /usr/local/share/zsh/site-functions
126+
sudo cp _sesh /usr/local/share/zsh/site-functions/
127+
128+
# Or install user-only
129+
mkdir -p ~/.zsh/completions
130+
cp _sesh ~/.zsh/completions/
131+
echo 'fpath=(~/.zsh/completions $fpath)' >> ~/.zshrc
132+
echo 'autoload -U compinit && compinit' >> ~/.zshrc
133+
134+
# Reload your shell
135+
source ~/.zshrc
136+
```
137+
138+
</details>
139+
140+
<details>
141+
<summary>Fish</summary>
142+
143+
```sh
144+
# Generate and install completion
145+
sesh completion fish > ~/.config/fish/completions/sesh.fish
146+
147+
# Reload fish configuration
148+
source ~/.config/fish/config.fish
149+
```
150+
151+
</details>
152+
153+
<details>
154+
<summary>PowerShell</summary>
155+
156+
```powershell
157+
# Generate completion script
158+
sesh completion powershell > sesh.ps1
159+
160+
# Create PowerShell profile directory if it doesn't exist
161+
mkdir -p (Split-Path $PROFILE)
162+
163+
# Add to PowerShell profile
164+
Add-Content $PROFILE ". /path/to/sesh.ps1"
165+
166+
# Reload PowerShell
167+
& $PROFILE
168+
```
169+
170+
</details>
171+
172+
After setting up completion, you can press Tab while typing `sesh` to see available commands, flags, and arguments.
173+
93174
## Extensions
94175

95176
## Raycast Extension

0 commit comments

Comments
 (0)