mirror of
https://github.com/janet-lang/janet
synced 2026-06-11 23:49:09 +00:00
2814fc53c2
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
Shell completions for Janet
This directory contains shell completion scripts for the janet interpreter.
Bash
# 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
# 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
cp janet.fish ~/.config/fish/completions/janet.fish