completions
The moon completions
command will generate moon command and argument completions for your current
shell. This command will write to stdout, which can then be redirected to a file of your choice.
$ moon completions > ./path/to/write/to
Options
--shell
- Shell to explicitly generate for. Accepts "bash", "elvish", "fish", "powershell", or "zsh".
Examples
- Bash
- Fish
- Zsh
If using bash-completion.
$ moon completions > ~/.bash_completion.d/moon.sh
Otherwise write the file to a common location, and source it in your profile.
$ moon completions > ~/.bash_completions/moon.sh
# In your profile
source ~/.bash_completions/moon.sh
Write the file to Fish's completions directory.
$ moon completions > ~/.config/fish/completions/moon.fish
If using oh-my-zsh (the _
prefix is required),
$ moon completions > ~/.oh-my-zsh/completions/_moon
# Reload shell (or restart terminal)
$ omz reload