Mix.Shell behaviour

Defines Mix.Shell contract.

Source

Summary

cmd(command, callback)

An implementation of the command callback that is shared across different shells

output_app?()

Returns if we should output application name to shell. Calling this function automatically toggles its value to false

Functions

cmd(command, callback)

An implementation of the command callback that is shared across different shells.

Source
output_app?()

Returns if we should output application name to shell. Calling this function automatically toggles its value to false.

Source

Callbacks

cmd(command)

Specs:

  • cmd(command :: binary) :: integer

Executes the given command and returns its exit status.

Source
error(message)

Specs:

  • error(message :: binary) :: any

Warns about the given error message.

Source
info(message)

Specs:

  • info(message :: binary) :: any

Informs the given message.

Source
yes?(message)

Specs:

  • yes?(message :: binary) :: any

Asks the user for confirmation.

Source