CliMate.ProcessShell (CLI Mate v0.7.1)
View SourceAn output shell implementation allowing your CLI commands to send their output as messages to themselves. This is most useful for tests.
The process that will receive the messages is found by looking up the first
pid in the :"$callers"
key of the process dictionary, or self()
if there
is no caller.
Use CliMate.put_shell(CliMate.ProcessShell)
to enable this shell.
This shell is called when calling one of:
CliMate.CLI.error/1 *
CliMate.CLI.warn/1CliMate.CLI.debug/1 *
CliMate.CLI.success/1CliMate.CLI.writeln/1 *
CliMate.CLI.halt_success/1CliMate.CLI.halt_error/1 *
CliMate.CLI.halt_error/2
A message of type shell_message/0
will be sent to self()
, or the caller
process for Task.async/1
and similar task functions.
Summary
Functions
Returns the pid of the process that will receive output messages.