Editing
IEx Commands
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== IEx Commands == {{toc}} IEx (Interactive Elixir) is an interactive shell used for running Elixir code, debugging, and experimenting with the language. It provides a set of commands that enhance the user experience and enable efficient development. This article covers the commonly used IEx commands and their functionalities. === h/1 === The `h/1` command allows you to access the documentation for a given Elixir module, function, or macro. It displays information about the provided argument, including its name, parameters, and description. Syntax: `h(argument)` Example: ``` iex> h(Enum.map) ``` === i/1 === The `i/1` command is used to inspect an Elixir expression, providing detailed information about its type, value, and other relevant data. Syntax: `i(expression)` Example: ``` iex> i("Hello, World!") ``` === c/1 === The `c/1` command compiles an Elixir source file or a list of files into bytecode, making it ready for execution. Syntax: `c(file | [files], options \\ [])` Example: ``` iex> c("my_file.ex") ``` === r/0 === The `r/0` command reloads the previously compiled module(s) during the current IEx session, allowing you to apply any changes made to the corresponding source code without restarting IEx. Syntax: `r()` Example: ``` iex> r() ``` === t/1 === The `t/1` command is used to retrieve information about a given Elixir data type, including its name, implementation, and associated protocols. Syntax: `t(type)` Example: ``` iex> t(List) ``` === L/0 === The `L/0` command lists all the modules that are currently loaded in the current IEx session. Syntax: `L()` Example: ``` iex> L() ``` === v/0 === The `v/0` command displays the currently defined local variables along with their respective values in the current IEx session. Syntax: `v()` Example: ``` iex> v() ``` === h/0 === The `h/0` command displays general information and a list of available IEx specific commands. Syntax: `h()` Example: ``` iex> h() ``` === q/0 === The `q/0` command is used to quit the current IEx session and return to the shell. Syntax: `q()` Example: ``` iex> q() ``` You can find more information about IEx and its commands in the [https://elixir-lang.org/getting-started/introduction.html Elixir official documentation]. {{stub}} [[Category:Elixir]] [[Category:Development]]
Summary:
Please note that all contributions to Elixir Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Elixir Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Stub
(
edit
)
Template:Toc
(
edit
)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information