Skip to content
Bash/Zsh completion scripts for Elm binary and tools
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE initial commit with elm, elm-test Aug 5, 2019 add some notes and tests about elm command not found Aug 15, 2019 add some notes and tests about elm command not found Aug 15, 2019

Bash/Zsh completion script for Elm binary and tools

Supported tools


To install, there are two options:

  • using /etc/bash_completion.d
  • using .bashrc

Whatever the method, be sure that the script is sourced after potential $PATH settings that allow to find the elm command as the completion script needs to be able to run elm --version.

It might be easier using .bashrc if you install elm using npm.

1. Add the file in /etc/bash_completion.d/ if it exists on your system:

sudo curl -o /etc/bash_completion.d/elm

2. Source the file from your ~/.bashrc

For example:

mkdir -p ~/.bash
cd ~/.bash
git clone
echo 'source ~/.bash/elm-sh-completion/' >> ~/.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-json comes with its own auto-generated completion scripts for bash, zsh and fish.
    See elm-json completions --help.
You can’t perform that action at this time.