File tree Expand file tree Collapse file tree 1 file changed +8
-14
lines changed
Expand file tree Collapse file tree 1 file changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -209,9 +209,14 @@ defmodule IEx do
209209 #
210210 # Sample contents of a local .iex file:
211211 #
212- # IEx.source " ~/. iex " # source another .iex file
213- # IO.puts " hello world " # print something before the shell starts
214- # value = 13 # bind a variable that'll be accessible in the shell
212+ # # source another .iex file, ~/.iex in this case
213+ # Code.require_file " . iex ", "~"
214+ #
215+ # # print something before the shell starts
216+ # IO.puts "hello world"
217+ #
218+ # # bind a variable that'll be accessible in the shell
219+ # value = 13
215220 #
216221 # Running the shell then results in
217222 #
@@ -245,15 +250,4 @@ defmodule IEx do
245250 end
246251 end
247252 end
248-
249- @doc " ""
250- Convenience function for use in . iex files . Converts `path` to an absolute
251- path ( also expanding ~ if present ) and requires the file at resulting path .
252-
253- In case of an error , prints exception info to stdout and terminates the shell .
254- "" "
255- def source(path) do
256- p = Path.expand(path)
257- Code.require_file(p)
258- end
259253end
You can’t perform that action at this time.
0 commit comments