From f450379229611c3c42c9460de64ec4c0598fc8fe Mon Sep 17 00:00:00 2001 From: gesh Date: Sun, 2 Mar 2025 17:08:31 +0200 Subject: [PATCH] ;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 --- hledger/Hledger/Cli/CliOptions.hs | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/hledger/Hledger/Cli/CliOptions.hs b/hledger/Hledger/Cli/CliOptions.hs index 02b780bce..c4e59ea0c 100644 --- a/hledger/Hledger/Cli/CliOptions.hs +++ b/hledger/Hledger/Cli/CliOptions.hs @@ -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: