Revision 097ad7ee htools/Ganeti/Daemon.hs

b/htools/Ganeti/Daemon.hs
81 81
data DaemonOptions = DaemonOptions
82 82
  { optShowHelp     :: Bool           -- ^ Just show the help
83 83
  , optShowVer      :: Bool           -- ^ Just show the program version
84
  , optShowComp     :: Bool           -- ^ Just show the completion info
84 85
  , optDaemonize    :: Bool           -- ^ Whether to daemonize or not
85 86
  , optPort         :: Maybe Word16   -- ^ Override for the network port
86 87
  , optDebug        :: Bool           -- ^ Enable debug messages
......
94 95
defaultOptions  = DaemonOptions
95 96
  { optShowHelp     = False
96 97
  , optShowVer      = False
98
  , optShowComp     = False
97 99
  , optDaemonize    = True
98 100
  , optPort         = Nothing
99 101
  , optDebug        = False
......
105 107
instance StandardOptions DaemonOptions where
106 108
  helpRequested = optShowHelp
107 109
  verRequested  = optShowVer
110
  compRequested = optShowComp
108 111
  requestHelp o = o { optShowHelp = True }
109 112
  requestVer  o = o { optShowVer  = True }
113
  requestComp o = o { optShowComp = True }
110 114

  
111 115
-- | Abrreviation for the option type.
112 116
type OptType = GenericOptType DaemonOptions
......
165 169
genericOpts :: [OptType]
166 170
genericOpts = [ oShowHelp
167 171
              , oShowVer
172
              , oShowComp
168 173
              ]
169 174

  
170 175
-- | Small wrapper over getArgs and 'parseOpts'.

Also available in: Unified diff