diff --git a/hledger/Hledger/Cli/CliOptions.hs b/hledger/Hledger/Cli/CliOptions.hs index 1b1997f47..e149ea10d 100644 --- a/hledger/Hledger/Cli/CliOptions.hs +++ b/hledger/Hledger/Cli/CliOptions.hs @@ -550,9 +550,8 @@ data CliOpts = CliOpts { ,no_new_accounts_ :: Bool -- add ,width_ :: Maybe String -- ^ the --width value provided, if any ,available_width_ :: Int -- ^ estimated usable screen width, based on - -- 1. the COLUMNS env var, if set - -- 2. the width reported by the terminal, if supported - -- 3. the default (80) + -- 1. the width reported by the terminal, if supported + -- 2. the default (80) ,progstarttime_ :: POSIXTime -- system POSIX time at start } deriving (Show) @@ -615,9 +614,8 @@ rawOptsToCliOpts rawopts = do usecolor <- useColorOnStdout let iopts = rawOptsToInputOpts day usecolor postingaccttags rawopts rspec <- either error' pure $ rawOptsToReportSpec day usecolor rawopts -- PARTIAL: - mcolumns <- readMay <$> getEnvSafe "COLUMNS" mtermwidth <- getTerminalWidth - let availablewidth = NE.head $ NE.fromList $ catMaybes [mcolumns, mtermwidth, Just defaultWidth] -- PARTIAL: fromList won't fail because non-null list + let availablewidth = NE.head $ NE.fromList $ catMaybes [mtermwidth, Just defaultWidth] -- PARTIAL: fromList won't fail because non-null list return defcliopts { rawopts_ = rawopts ,command_ = command @@ -763,8 +761,7 @@ rulesFilePathFromOpts opts = do 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 COLUMNS environment --- -- variable, or (on posix platforms) the current terminal width, or 80. +-- -- 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 @@ -779,7 +776,7 @@ rulesFilePathFromOpts opts = do -- and also the description column width if specified (following the main width, comma-separated). -- The widths will be as follows: -- @ --- no --width flag - overall width is the available width (COLUMNS, or posix terminal width, or 80); description width is unspecified (auto) +-- no --width flag - overall width is the available width (or terminal width, or 80); description width is unspecified (auto) -- --width W - overall width is W, description width is auto -- --width W,D - overall width is W, description width is D -- @ diff --git a/hledger/Hledger/Cli/Commands/Aregister.hs b/hledger/Hledger/Cli/Commands/Aregister.hs index d79a74a81..76baf6579 100644 --- a/hledger/Hledger/Cli/Commands/Aregister.hs +++ b/hledger/Hledger/Cli/Commands/Aregister.hs @@ -65,7 +65,7 @@ aregistermode = hledgerCommandMode #else "terminal width" #endif - ++ " or $COLUMNS). -wN,M sets description width as well." + ++ "). -wN,M sets description width as well." ) ,flagNone ["align-all"] (setboolopt "align-all") "guarantee alignment across all lines (slower)" ,outputFormatFlag ["txt","html","csv","tsv","json"] diff --git a/hledger/Hledger/Cli/Commands/Register.hs b/hledger/Hledger/Cli/Commands/Register.hs index 3d22b5488..5a8a2a235 100644 --- a/hledger/Hledger/Cli/Commands/Register.hs +++ b/hledger/Hledger/Cli/Commands/Register.hs @@ -67,7 +67,7 @@ registermode = hledgerCommandMode #else "terminal width" #endif - ++ " or $COLUMNS). -wN,M sets description width as well." + ++ "). -wN,M sets description width as well." ) ,flagNone ["align-all"] (setboolopt "align-all") "guarantee alignment across all lines (slower)" ,flagReq ["base-url"] (\s opts -> Right $ setopt "base-url" s opts) "URLPREFIX" "in html output, generate links to hledger-web, with this prefix. (Usually the base url shown by hledger-web; can also be relative.)"