formatOptions :: CommandSummary -> T.Text
formatOptions (CommandSummary _ _ opts) =
    T.unlines $ zipWith line flags'' descs
  where
    (flags, descs) = unzip opts
    flags' = map (T.intercalate ", ") flags
    n = maximum $ map T.length flags'
    flags'' = map (T.justifyLeft n ' ') flags'
    line f d = T.concat ["  ", f, "    ", d]

-- | Find an option description in a summary, if there.
formatOptions :: CommandSummary -> T.Text
formatOptions (CommandSummary _ _ opts) =
    T.unlines $ zipWith line flags'' descs
  where
    (flags, descs) = unzip opts
    flags' = map (T.intercalate ", ") flags
    n = maximum $ map T.length flags'
    flags'' = map (T.justifyLeft n ' ') flags'
    line f d = T.concat ["  ", f, "    ", d]

-- | Find an option description in a summary, if there.
formatOptions (CommandSummary _ _ opts) =
    T.unlines $ zipWith line flags'' descs
  where
    (flags, descs) = unzip opts
    flags' = map (T.intercalate ", ") flags
    n = maximum $ map T.length flags'
    flags'' = map (T.justifyLeft n ' ') flags'
    line f d = T.concat ["  ", f, "    ", d]

-- | Find an option description in a summary, if there.