Skip to content

Commit 1f61ba4

Browse files
author
José Valim
committed
Merge pull request #2253 from bitwalker/win-iex-help
Print help when --help, -h, or /h are given on windows
2 parents 55d0f56 + 19ad387 commit 1f61ba4

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

bin/elixir.bat

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
@echo off
22
set argc=0
3-
for %%x in (%*) do set /A argc+=1
4-
if %argc%== 0 (
5-
goto documentation
6-
) else (
7-
goto parseopts
3+
for %%A in (%*) do (
4+
if "%%A"=="--help" goto documentation
5+
if "%%A"=="-h" goto documentation
6+
if "%%A"=="/h" goto documentation
7+
set /A argc+=1
88
)
9+
if %argc%==0 goto documentation
10+
goto parseopts
11+
912
:documentation
1013
echo Usage: %~nx0 [options] [.exs file] [data]
1114
echo.

bin/elixirc.bat

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
@echo off
22
set argc=0
3-
for %%x in (%*) do set /A argc+=1
4-
if %argc% == 0 (
5-
goto documentation
6-
) else (
7-
goto run
3+
for %%A in (%*) do (
4+
if "%%A"=="--help" goto documentation
5+
if "%%A"=="-h" goto documentation
6+
if "%%A"=="/h" goto documentation
7+
set /A argc+=1
88
)
9+
if %argc%==0 goto documentation
10+
goto run
11+
912
:documentation
1013
echo Usage: %~nx0 [elixir switches] [compiler switches] [.ex files]
1114
echo.

0 commit comments

Comments
 (0)