Reputation: 672
This is my first couple of hours of Erlang experimentation. So be gentle, please.
At this point nothing was displayed, whereas all other modules were auto-completed. So I (reasonably) assumed that the module beam files hadn't been loaded - lead me to all sorts of fruitless investigations of paths, etc.
But the code had been loaded, it just wasn't being auto-completed.
1> {ok,C} = eredis:start_link().
{ok,<0.35.0>}
2> eredis:q(C,["SET","foo","bar"]).
{ok,<<"OK">>}
3> eredis:q(C,["GET","foo"]).
{ok,<<"bar">>}
Great, but I'd really like auto-complete to work. Is there a way to get it working? In Zsh for example, I have to execute rehash for new path items to show up - do I need to execute something similar here?
Upvotes: 2
Views: 368
Reputation: 5500
You need to make sure the module is loaded in the shell, adding it to the path with -pa
just tells the VM where to look for modules when trying to load them.
There are several ways of loading a module
eredis:start_link()
call you would be able to tab-complete eredis)l(Module)
code:load_file(Module)
Load all erlang modules in path is very useful!
Upvotes: 2