Skip to content

Commit 4167e25

Browse files
tutorial off by default
1 parent d90a34f commit 4167e25

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

app/Main.hs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import qualified Graphics.Vty.UnicodeWidthTable.Query as V
3232

3333
data PotatoCLIOptions = PotatoCLIOptions {
3434
_potatoCLIOptions_args :: [String]
35-
, _potatoCLIOptions_empty :: Bool
35+
, _potatoCLIOptions_tutorial :: Bool
3636
, _potatoCLIOptions_generateUnicodeWidthTable :: Bool
3737
, _potatoCLIOptions_version :: Bool
3838
}
@@ -42,9 +42,9 @@ sample :: Parser PotatoCLIOptions
4242
sample = PotatoCLIOptions
4343
<$> many (argument str (metavar "FILE"))
4444
<*> switch
45-
( long "empty"
46-
<> short 'e'
47-
<> help "open an empty document" )
45+
( long "tutorial"
46+
<> short 't'
47+
<> help "open the tutorial doc" )
4848
<*> switch
4949
( long "widthtable"
5050
<> help "generate unicode width table for your terminal using vty" )
@@ -95,7 +95,7 @@ mainWithDebug = do
9595

9696

9797
-- see if the argument file we passed in exists or not
98-
minitfile <- if _potatoCLIOptions_empty opts
98+
minitfile <- if not (_potatoCLIOptions_tutorial opts)
9999
then
100100
return Nothing
101101
else case nonEmpty (_potatoCLIOptions_args opts) of
@@ -137,7 +137,7 @@ mainWithDebug = do
137137
config = MainPFWidgetConfig {
138138
_mainPFWidgetConfig_initialFile = minitfile
139139
, _mainPFWidgetConfig_homeDirectory = homeDir
140-
, _mainPFWidgetConfig_initialState = if _potatoCLIOptions_empty opts
140+
, _mainPFWidgetConfig_initialState = if not (_potatoCLIOptions_tutorial opts)
141141
then (owlpfstate_newProject, emptyControllerMeta)
142142
-- TODO load tutorial here owlpfstate_tutorial
143143
--else owlpfstate_attachments1

0 commit comments

Comments
 (0)