Status Update - 24 May 2018 - PART TWO

Skip to first unread message

Evan Czaplicki

May 25, 2018, 12:15:50 AM5/25/18
to elm-dev
LIST ONLY - not for sharing on reddit, discourse, hn, twitter, etc.

The binaries support autocompletion. Surprise!

This has been true the whole time, but I wanted to focus on other things first. I felt it would have been too much all at once.

With Bash

If you are using bash and elm is on your PATH, all you need to do is type the following line:

complete -C elm elm

That will enable autocompletion in the current terminal tab. If you put it in your .bashrc you can get it in any new tab as well. Please let me know if you run into anything odd with it!

With Not-Bash

If you use not-bash, I have exposed a command to run to get suggestions:

elm ma<TAB>          # elm autocomplete 1 ma
elm make --opt<TAB>  # elm autocomplete 2 make --opt

The part in the comment is what you run to get the suggestions. autocomplete, followed by the index of the argument, followed by all the arguments.

We need to make little scripts so that zsh, fish, and others can benefit from this!

If you create one, please share it in #elm-dev. I want to:
  1. see if the elm autocomplete API is sufficient (e.g. point vs index)
  2. have those scripts ready to go (and as simple as possible) for folks installing once 0.19 is out
If it seems to work for folks in #elm-dev, post it in this thread so it is available more permanently!

Evan Czaplicki

May 25, 2018, 1:08:02 PM5/25/18
to elm-dev
I learned more about fish from Ossi, and I now have a revised idea of how to set up completion. I wrote about what I have so far here:

Currently have plans for bash and fish. Would like more info on other shells!
Reply all
Reply to author
0 new messages