Files
janet/misc/completion/README.md
Rybnikov Alex 2814fc53c2 Add bash, zsh, and fish shell completions for janet (#1753)
Adds completion scripts for the janet interpreter covering all
flags documented in the man page: -h -v -s -e -E -d -n -N -r -R
-p -q -k -i -m -c -l -w -x --.

Flag-aware completions: -m completes directories, -c/-l complete
.janet files, -w/-x complete linting levels.

Closes #1567
2026-05-19 07:51:14 -05:00

34 lines
666 B
Markdown

# Shell completions for Janet
This directory contains shell completion scripts for the `janet` interpreter.
## Bash
```sh
# Temporary (current session only)
source /path/to/janet.bash
# Permanent (system-wide)
sudo cp janet.bash /etc/bash_completion.d/janet
# Permanent (user only)
cp janet.bash ~/.local/share/bash-completion/completions/janet
```
## Zsh
```sh
# Copy to a directory in your $fpath, e.g.:
cp janet.zsh ~/.zsh/completions/_janet
# Ensure the directory is in $fpath (add to ~/.zshrc if needed):
# fpath=(~/.zsh/completions $fpath)
# autoload -Uz compinit && compinit
```
## Fish
```sh
cp janet.fish ~/.config/fish/completions/janet.fish
```