Bash/Zsh completion script for Elm binary and tools
To install, there are two options:
Whatever the method, be sure that the script is sourced after
$PATH settings that allow to find the
as the completion script needs to be able to run
It might be easier using
.bashrc if you install
1. Add the file in /etc/bash_completion.d/ if it exists on your system:
sudo curl -o /etc/bash_completion.d/elm https://raw.githubusercontent.com/dmy/elm-sh-completion/master/elm-completion.sh
2. Source the file from your ~/.bashrc
mkdir -p ~/.bash cd ~/.bash git clone https://github.com/dmy/elm-sh-completion.git echo 'source ~/.bash/elm-sh-completion/elm-completion.sh' >> ~/.bashrc
- Packages are also matched from partial match, so you can complete packages by using the package name or part of it, for example:
elm ins[TAB] elm install regex[TAB] elm install elm/regex
If there are several matches, the common prefix of all matches will be completed.
- Packages are auto-completed from the local cache for efficiency, so packages that have never been installed are not completed.
- Zsh completion uses bashcompinit.
- Cygwin is theorically supported, but this has not been tested yet.
elm-jsoncomes with its own auto-generated completion scripts for bash, zsh and fish.
elm-json completions --help.