anchor.diff:  %% immediately kill the script. ctrl-g, however, works fine
   
   shell(State) ->
  +    setup_paths(State),
  +    ok = reread_config(State),
  +    maybe_boot_apps(State),
  +    setup_shell(),
  +    %% try to read in sys.config file
  +    %% this call never returns (until user quits shell)
  +    timer:sleep(infinity).
  +
  +info() ->
  +    "Start a shell with project and deps preloaded similar to~n'erl -pa ebin -pa deps/*/ebin'.~n".
  +
  +setup_shell() ->
       %% scan all processes for any with references to the old user and save them to
       %% update later
       NeedsUpdate = [Pid || Pid <- erlang:processes(),
  
positive.code: 
  -spec init(rebar_state:t()) -> {ok, rebar_state:t()}.
  init(State) ->
      State1 = rebar_state:add_provider(State, providers:create([{name, ?PROVIDER},
                                                                 {module, ?MODULE},
                                                                 {bare, false},
                                                                 {deps, ?DEPS},
                                                                 {example, "rebar3 shell"},
                                                                 {short_desc, "Run shell with project apps and deps in path."},
                                                                 {desc, info()},
                                                                 {opts, [{config, undefined, "config", string, "Path to the config file to use. Defaults to the sys_config defined for relx, if present."}]}])),
      {ok, State1}.
  
  -spec do(rebar_state:t()) -> {ok, rebar_state:t()} | {error, string()}.
  
negative.code:     end.
  
  add_test_paths(State) ->
      _ = [begin
              AppDir = rebar_app_info:out_dir(App),
              %% ignore errors resulting from non-existent directories
              _ = code:add_path(filename:join([AppDir, "test"]))
           end || App <- rebar_state:project_apps(State)],
      _ = code:add_path(filename:join([rebar_dir:base_dir(State), "test"])),
      ok.
  
  % First try the --config flag, then try the relx sys_config
  -spec find_config(rebar_state:t()) -> [tuple()] | no_config.
  