Mix v1.2.6 Mix.Shell.IO

This is Mix’s default shell.

It simply prints messages to stdio and stderr.

Summary

Functions

Executes the given command and prints its output to stdout as it comes

Writes an error message to the shell followed by new line

Writes a message to the shell followed by new line

Prints the currently running application if it was not printed yet

Writes a message shell followed by prompting the user for input. Input will be consumed until enter is pressed

Receives a message and asks the user if they want to proceed. The user must press enter or type anything that matches the “yes” regex ~r/^Y(es)?$/i

Functions

cmd(command, opts \\ [])

Executes the given command and prints its output to stdout as it comes.

error(message)

Writes an error message to the shell followed by new line.

info(message)

Writes a message to the shell followed by new line.

prompt(message)

Writes a message shell followed by prompting the user for input. Input will be consumed until enter is pressed.

yes?(message)

Receives a message and asks the user if they want to proceed. The user must press enter or type anything that matches the “yes” regex ~r/^Y(es)?$/i.