Mix.Shell.IO
This is Mix’s default shell.
It simply prints messages to stdio and stderr.
Summary
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
- print_app()
-
Prints the currently running application if it was not printed yet
- 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
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.
print_app()
Prints the currently running application if it was not printed yet.
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
.
© 2012 Plataformatec
Licensed under the Apache License, Version 2.0.
https://hexdocs.pm/mix/1.3.4/Mix.Shell.IO.html