import Paths_haeredes (version)
import Data.Version (showVersion)
+import Timeout (Timeout(..))
+
-- | Description of the 'NS' mode.
ns_description :: String
ns_description =
no_append_root_help :: String
no_append_root_help =
- "Don't append a trailing dot to DNS names."
+ "Don't append a trailing dot to DNS names"
-- | Help string for the --server flag.
server_help :: String
server_help =
"IP address or hostname of server to query " ++
- "(will use resolv.conf if not specified)."
+ "(will use resolv.conf if not specified)"
+
+-- | Help string for the --timeout flag.
+timeout_help :: String
+timeout_help =
+ "Query timeout, in seconds (default: " ++ defstr ++ ")"
+ where
+ defstr = show $ seconds (def :: Timeout)
-- | The Args type represents the possible command-line options. The
-- duplication here seems necessary; CmdArgs' magic requires us to
data Args =
NS { no_append_root :: Bool,
server :: Maybe String,
+ timeout :: Timeout,
delegates :: [String] } |
MX { no_append_root :: Bool,
server :: Maybe String,
+ timeout :: Timeout,
delegates :: [String] }
deriving (Data, Show, Typeable)
server = def
&= groupname "Common flags"
- &= typ "IP"
+ &= typ "HOST"
&= help server_help,
+ timeout = def
+ &= groupname "Common flags"
+ &= typ "SECONDS"
+ &= help timeout_help,
+
delegates = def
&= args
&= typ "DELEGATES" }
&= typ "IP"
&= help server_help,
+ timeout = def
+ &= groupname "Common flags"
+ &= typ "SECONDS"
+ &= help timeout_help,
+
delegates = def
&= args
&= typ "DELEGATES" }