power_shell: advanced system-wide Erlang shell capabilities

Copyright © Copyright (c) WhatsApp Inc. and its affiliates. All rights reserved.

Version: 1.1.5

Authors: Maxim Fedorov.

power_shell can be used as an application, and in form of a library. When started as application, power_shell examines shell_integration configuration parameter. It can be set to shell_default, or user_default. Depending on the parameter, power_shell can load itself as user_default module (if none was loaded before), or add proxy calls to already loaded user_default module.

Evaluating non-exported functions

Enter
  power_shell:eval(Mod, Fun, [Arg1, Arg2, Arg3]).

in the shell to evaluate function Fun in module Mod. It does not need to be exported. If module Mod is currently loaded, power_shell will try to locate corresponding *.beam file, load debug info chunk and evaluate function Fun with supplied arguments. If module is not loaded, but *.beam file can be found, power_shell does not attempt to load it. However, if there is a remote (fully qualified) call, Erlang VM (BEAM) will load the file automatically.

When shell integration (injection) is enabled, evaluating non-exported functions is simplified to just
  eval(Mod, Fun, [Args].

Debugging shortcuts

Available with shell integration.

Configuration

During application startup, power_shell examines following application environment variables:

It is possible to supply values using sys.config file, or via command line when starting BEAM:

               erl -power_shell cache_code true

Generated by EDoc