Shell: Erlang tab completion
Get quicker access to Zotonic code on the shell.
Contributed by: Maas-Maarten Zeeman
When you are working on the shell chances are you are looking to be fast. A way to be faster is to leverage the EShell's tab completion.
Readers are assumed to be comfortable using the EShell to run Erlang code interactively. This feature this guide describes only works with Zotonic modules only from zotonic debug. With zotonic shell the Zotonic modules need to be explicitly loaded to work with tab-completion.
The Erlang shell has tab-completion. IIt is very handy for using in Zotonic, especially because of Zotonic's naming scheme. Just type
And you get a list of zotonic library modules. Type:
> mod_<tab>, type m_<tab> a list of models.
You get the idea. The really nice thing is that it works for function names too.
Are the modules you are tab-completing loaded?
From zotonic debug the Zotonic modules will be loaded, but from zotonic shell they won't be. This can be solved with a boot file for the connecting node used by zotonic shell, but it hasn't yet been implemented.
Seeking further assistance
There are no other troubleshooting steps available for this guide. Please provide any you have learned in the comments below or on the Zotonic Users Group.
This page is part of the Zotonic documentation, which is licensed under the Apache License 2.0.