Mix.Shell.IO

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.

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–2017 Plataformatec
Licensed under the Apache License, Version 2.0.
https://hexdocs.pm/mix/1.3.4/Mix.Shell.IO.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部