Skip to content

Commit 4132ea0

Browse files
committed
Add --version flag
1 parent 5d876f5 commit 4132ea0

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

app/Main.hs

+10-8
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,21 @@ stackTagOptions =
2424
<> help "Completely re-run tag command. Don't use cached tag files." )
2525

2626
optsDesc :: String
27-
optsDesc
28-
= "Create ctags/etags for a project and all dependencies"
27+
optsDesc = "Create ctags/etags for a project and all dependencies"
2928

3029
optsHeader :: String
31-
optsHeader
32-
= "stack-tag - Create etags/ctags for a stack project based on snapshot"
30+
optsHeader = "stack-tag - Create etags/ctags for a stack project based on snapshot"
3331

3432
stackTagOpts :: ParserInfo StackTagOpts
3533
stackTagOpts =
36-
info (helper <*> stackTagOptions)
37-
( fullDesc
38-
<> progDesc optsDesc
39-
<> header optsHeader )
34+
info
35+
(helper
36+
<*> infoOption "stack-tag v0.2.0, (c) Christopher Reichert 2018"
37+
( long "version" <> help "Display version string" )
38+
<*> stackTagOptions )
39+
( fullDesc
40+
<> progDesc optsDesc
41+
<> header optsHeader )
4042

4143
main :: IO ()
4244
main = execParser stackTagOpts >>= stackTag

0 commit comments

Comments
 (0)