@@ -162,6 +162,18 @@ nameToAliasList = (
162
162
[] )
163
163
164
164
165
+ {- Imitates output from `git describe` -}
166
+ versionSlug :: Text
167
+ versionSlug =
168
+ let
169
+ gitInfo = $$ tGitInfoCwd
170
+ in
171
+ fromString $
172
+ (showVersion version)
173
+ <> " +" <> take 8 (giHash gitInfo)
174
+ <> (if giDirty gitInfo then " -dirty" else " " )
175
+
176
+
165
177
aliasWarning :: Text -> Doc AnsiStyle
166
178
aliasWarning alias =
167
179
" Invalid command."
@@ -620,21 +632,18 @@ commandParser conf =
620
632
commandParserInfo :: Config -> ParserInfo Command
621
633
commandParserInfo conf =
622
634
let
623
- gitInfo = $$ tGitInfoCwd
624
- versionString =
635
+ versionDesc =
625
636
" Version "
626
- <> (showVersion version)
627
- <> " +" <> take 8 (giHash gitInfo)
628
- <> (if giDirty gitInfo then " -dirty" else " " )
629
- <> " , developed by <adriansieber.com>\n "
637
+ <> versionSlug
638
+ <> " , developed by <adriansieber.com>"
630
639
in
631
640
info
632
641
(helper <*> commandParser conf)
633
642
(noIntersperse
634
643
<> briefDesc
635
644
<> headerDoc (Just " {{header}}" )
636
645
<> progDescDoc (Just " {{examples}}" )
637
- <> footerDoc (Just $ fromString versionString )
646
+ <> footerDoc (Just $ fromString $ T. unpack versionDesc )
638
647
)
639
648
640
649
@@ -800,7 +809,7 @@ executeCLiCommand conf now connection cmd =
800
809
{- Unset -}
801
810
UnDueTasks ids -> undueTasks conf connection ids
802
811
803
- Version -> pure $ pretty (showVersion version) <> hardline
812
+ Version -> pure $ pretty versionSlug <> hardline
804
813
Help -> pure $ helpText conf
805
814
PrintConfig -> pure $ pretty conf
806
815
Alias alias -> pure $ aliasWarning alias
0 commit comments