anchor.diff:                           "A list of apps to boot before starting the "
                            "shell. (E.g. --apps app1,app2,app3) Defaults "
                            "to rebar.config {shell, [{apps, Apps}]} or "
  -                         "relx apps if not specified."}]}
  +                         "relx apps if not specified."},
  +                        {user_drv_args, undefined, "user_drv_args", string,
  +                         "Arguments passed to user_drv start function for "
  +                         "creating custom shells."}]}
               ])
       ),
       {ok, State1}.
  
positive.code: info() ->
      "Start a shell with project and deps preloaded similar to~n'erl -pa ebin -pa deps/*/ebin'.~n".
  
  setup_shell() ->
      OldUser = kill_old_user(),
      %% Test for support here
      NewUser = try erlang:open_port({spawn,"tty_sl -c -e"}, []) of
          Port when is_port(Port) ->
              true = port_close(Port),
              setup_new_shell()
      catch
          error:_ ->
              setup_old_shell()
  
negative.code:             wait_for_port_death(N-10, P)
      end.
  
  setup_new_shell(ShellArgs) ->
      %% terminate the current user supervision structure, if any
      _ = supervisor:terminate_child(kernel_sup, user),
      %% start a new shell (this also starts a new user under the correct group)
      case ShellArgs of
          undefined ->
              _ = user_drv:start();
          _ ->
              _ = user_drv:start(ShellArgs)
      end,
      %% wait until user_drv and user have been registered (max 3 seconds)
      ok = wait_until_user_started(3000),
      whereis(user).
  