;cln: Remove unused widthFromOpts (see 5c289ac)

As noted in 5c289ac, it is unused elsewhere, and registerWidthsFromOpts
is right next to it and implements nearly the exact same logic
This commit is contained in:
gesh 2025-03-02 17:08:31 +02:00 committed by Simon Michael
parent a1bcdcd157
commit f450379229

View File

@ -72,7 +72,6 @@ module Hledger.Cli.CliOptions (
outputFileFromOpts,
outputFormatFromOpts,
defaultWidth,
-- widthFromOpts,
replaceNumericFlags,
ensureDebugFlagHasVal,
-- | For register:
@ -759,18 +758,6 @@ rulesFilePathFromOpts opts = do
d <- getCurrentDirectory
maybe (return Nothing) (fmap Just . expandPath d) $ mrules_file_ $ inputopts_ opts
-- -- | Get the width in characters to use for console output.
-- -- This comes from the --width option, or the current terminal width, or 80.
-- -- Will raise a parse error for a malformed --width argument.
-- widthFromOpts :: CliOpts -> Int
-- widthFromOpts CliOpts{width_=Nothing, available_width_=w} = w
-- widthFromOpts CliOpts{width_=Just s} =
-- case runParser (read `fmap` some digitChar <* eof :: ParsecT Void String Identity Int) "(unknown)" s of
-- Left e -> usageError $ "could not parse width option: "++errorBundlePretty e
-- Right w -> w
-- for register:
-- | Get the width in characters to use for the register command's console output,
-- and also the description column width if specified (following the main width, comma-separated).
-- The widths will be as follows: