<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div>`rebar3 shell` can start apps and load config instead of creating this custom commands: <a href="http://ferd.ca/dev/rebar3-shell.html">http://ferd.ca/dev/rebar3-shell.html</a><br></div>
<div> </div>
<div id="sig19496053"><div class="signature">-- <br></div>
<div class="signature">Tristan Sloughter<br></div>
<div class="signature">t@crashfast.com<br></div>
<div class="signature"> </div>
</div>
<div> </div>
<div> </div>
<div>On Sat, Mar 26, 2016, at 02:45 PM, Pierre Fenoll wrote:<br></div>
<blockquote type="cite"><div dir="ltr"><div><div> </div>
<div><div>On 26 March 2016 at 20:36, Roger Lipscombe <span dir="ltr"><<a href="mailto:roger@differentpla.net">roger@differentpla.net</a>></span> wrote:<br></div>
<blockquote style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204, 204, 204);padding-left:1ex;"><div style="overflow-x:hidden;overflow-y:hidden;"><div>erl -pa apps/*/ebin -pa deps/*/ebin -sname foo -config dev -s foo -s bar -s baz<br></div>
<div> </div>
<div>
...assuming that we want to run foo, bar and baz top-level<br></div>
<div>
applications in a single node (which we do in dev). Then we have<br></div>
<div>
(more-or-less):<br></div>
<div> </div>
<div>
-module(foo).<br></div>
<div>
-export([start/0]).<br></div>
<div>
start() -><br></div>
<div>
{ok, _} = application:ensure_all_started(foo).<br></div>
</div>
</blockquote></div>
<div> </div>
<div>I often find the need to do that exact same pattern:<br></div>
</div>
<div>* erl … -s myapp<br></div>
<div>* add myapp:start/0 that calls ensure_all_started/1 and matches its output to {ok, _}<br></div>
<div> </div>
<div>Would it be a terrible idea to add some CLI option "-app" that would do the same as "-s"<br></div>
<div>except it would call application:ensure_all_started instead of application:start ?<br></div>
</div>
<div><u>_______________________________________________</u><br></div>
<div>erlang-questions mailing list<br></div>
<div><a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br></div>
<div><a href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a><br></div>
</blockquote><div> </div>
</body>
</html>