Mix.Shell.Process.prompt

You're seeing just the function prompt, go back to Mix.Shell.Process module for more information.

Forwards the message to the current process.

It also checks the inbox for an input message matching:

{:mix_shell_input, :prompt, value}

If one does not exist, it will abort since there was no shell process inputs given. value must be a string.

Examples

The following will answer with "Meg" to the prompt "What's your name?":

# The response is sent before calling prompt/1 so that prompt/1 can read it
send(self(), {:mix_shell_input, :prompt, "Meg"})
Mix.shell().prompt("What's your name?")