@@ -23,7 +23,7 @@ defmodule Mix.Tasks.Help do
23
23
24
24
docs = lc module inlist modules ,
25
25
doc = Mix.Task . shortdoc ( module ) do
26
- { Mix.Task . task_name ( module ) , doc }
26
+ { "mix " <> Mix.Task . task_name ( module ) , doc }
27
27
end
28
28
29
29
max = Enum . reduce docs , 0 , fn ( { task , _ } , acc ) ->
@@ -32,11 +32,11 @@ defmodule Mix.Tasks.Help do
32
32
33
33
display_default_task_doc ( max )
34
34
35
- sorted = Enum . sort ( docs )
36
-
37
- Enum . each sorted , fn ( { task , doc } ) ->
35
+ Enum . each Enum . sort ( docs ) , fn ( { task , doc } ) ->
38
36
shell . info format_task ( task , max , doc )
39
37
end
38
+
39
+ display_iex_task_doc ( max )
40
40
end
41
41
42
42
def run ( [ task ] ) do
@@ -54,7 +54,7 @@ defmodule Mix.Tasks.Help do
54
54
end
55
55
56
56
defp format_task ( task , max , doc ) do
57
- "mix " <> String . ljust ( task , max ) <> " # " <> doc
57
+ String . ljust ( task , max ) <> " # " <> doc
58
58
end
59
59
60
60
defp where_is_file ( module ) do
@@ -65,7 +65,12 @@ defmodule Mix.Tasks.Help do
65
65
end
66
66
67
67
defp display_default_task_doc ( max ) do
68
- Mix . shell . info format_task ( "" , max ,
68
+ Mix . shell . info format_task ( "mix " , max ,
69
69
"Run the default task (current: mix #{ Mix . project [ :default_task ] } )" )
70
70
end
71
+
72
+ defp display_iex_task_doc ( max ) do
73
+ Mix . shell . info format_task ( "iex -S mix" , max ,
74
+ "Start IEx and run the default task" )
75
+ end
71
76
end
0 commit comments