Skip to content

Commit c758c5e

Browse files
author
José Valim
committed
Update docs for c/1 and c/2
1 parent 7b4576f commit c758c5e

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

lib/iex/lib/iex/helpers.ex

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ defmodule IEx.Helpers do
2323
There are many other helpers available:
2424
2525
* `b/1` - prints callbacks info and docs for a given module
26-
* `c/1` - compiles a file at the current directory
27-
* `c/2` - compiles a file at the given path
26+
* `c/1` - compiles a file into the current directory
27+
* `c/2` - compiles a file to the given path
2828
* `cd/1` - changes the current directory
2929
* `clear/0` - clears the screen
3030
* `flush/0` - flushes all messages sent to the shell
@@ -115,6 +115,7 @@ defmodule IEx.Helpers do
115115
116116
c "baz.ex"
117117
#=> [Baz]
118+
118119
"""
119120
def c(files, path \\ ".") when is_binary(path) do
120121
files = List.wrap(files)
@@ -123,10 +124,7 @@ defmodule IEx.Helpers do
123124
raise ArgumentError, "expected a binary or a list of binaries as argument"
124125
end
125126

126-
{found, not_found} =
127-
files
128-
|> Enum.map(&Path.expand(&1, path))
129-
|> Enum.partition(&File.exists?/1)
127+
{found, not_found} = Enum.partition(files, &File.exists?/1)
130128

131129
unless Enum.empty?(not_found) do
132130
raise ArgumentError, "could not find files #{Enum.join(not_found, ", ")}"

0 commit comments

Comments
 (0)