Skip to content

Instantly share code, notes, and snippets.

@evancz
Last active June 6, 2018 21:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evancz/40a5f9b3f39be087cb32088a73204a20 to your computer and use it in GitHub Desktop.
Save evancz/40a5f9b3f39be087cb32088a73204a20 to your computer and use it in GitHub Desktop.
Ideas on how to get completion working in terminal

Completion

Here is the idea for setting up completion with a broad range of shells.

elm setup-completion <SHELL>

Bash

Add elm setup-completion bash to .bashrc.

It would run complete -C elm elm and do things with environment variables.

Fish

Add elm setup-completion fish to ~/.config/fish/config.fish.

It creates ~/.config/fish/completions/elm.fish which will be like:

This will allow me to add the descriptions and example values that I have.

Thanks to Ossi for sharing this info!

Zsh

Add elm setup-completion zsh to ~/.zshrc.

Maybe it just runs all the commands that are needed. More on the situation in:

Thanks to Mario for this information!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment