Stop appending a trailing dot when autocompleting modules in IEx.#4863
Conversation
|
I'm not in support of merging this, if only because the vast majority of the time I autocomplete a module in IEx it is to make a remote call. I would be in support of making this configurable, however. I think you should take this discussion to the core mailing list so that the community can discuss further. :) |
|
Thank you @myronmarston. I think it is worth bringing it to the mailing list indeed although I think my thoughts inline well with what @antipax said. :) |
|
Fair enough. I'll start a thread on the mailing list later this morning when I'm on my computer and not limited to typing on an iPhone keyboard :-). |
|
Ok, closing this and we can reopen depending on how it goes. :) |
|
Discussion moved to the mailing list: https://groups.google.com/forum/#!topic/elixir-lang-core/ZDbAdRgCvzw |
|
I have reopened this because an option is definitely welcome. IEx already has an app configuration and we can have a new key in there. The mailing list conversation will still be useful to choose a proper default value. :) |
|
Cool. Let me know when you've decided what to call the config option and what default to give it, and I'll update this PR. |
818f1d4 to
b096959
Compare
|
OK, I implemented the "double tab" solution discussed in the mailing list that there seemed to be consensus about. Please let me know if you're satisfied with this, @josevalim. |
I find this behavior to be surprising and annoying. I regularly type `h [first few chars of mod name]<tab><enter>` in IEx to read the read the moduledoc of a particular module, and the trailing dot gets in the way every time. Instead, we append a dot when you hit tab after the module name is already complete--so if you hit tab twice, it will autocomplete the module name and then append a trailing dot.
b096959 to
0f9da74
Compare
|
❤️ 💚 💙 💛 💜 |
I find this behavior to be surprising and annoying. I regularly type
h [first few chars of mod name]<tab><enter>in IEx to read the read the moduledoc of a particular module, and the trailing period gets in the way every time.Here's a demonstration showing what happens to me regularly when I try to read the
@moduledocfor a module:With this change, it avoids this problem:
Now, I know the existing behavior must be intentional (after all, it's been there a long time and was specified by tests) so I'm fully expecting that this may not be merged. If the elixir-core team feels the existing behavior is best, that's fine. Figured I'd open the PR and see if @josevalim and the team are open to changing, it, though, since I've found it so consistently annoying.