fix:cli:paging: support older less, don't pass --use-color [#2335]
Older less versions (eg 551) require --use-colour, and break if --use-color is passed. So we no longer attempt to enable colour in less by default.
This commit is contained in:
parent
f450379229
commit
cb373447db
@ -468,7 +468,6 @@ getTerminalWidth = fmap snd <$> getTerminalHeightWidth
|
||||
-- --shift=8
|
||||
-- --squeeze-blank-lines
|
||||
-- --use-backslash
|
||||
-- --use-color
|
||||
--
|
||||
-- You can choose different options by setting the HLEDGER_LESS variable;
|
||||
-- if set, its value will be used instead of LESS.
|
||||
@ -491,7 +490,7 @@ setupPager = do
|
||||
,"--shift=8"
|
||||
,"--squeeze-blank-lines"
|
||||
,"--use-backslash"
|
||||
,"--use-color"
|
||||
-- ,"--use-color" #2335 rejected by older less versions (eg 551)
|
||||
]
|
||||
mhledgerless <- lookupEnv "HLEDGER_LESS"
|
||||
mless <- lookupEnv "LESS"
|
||||
|
||||
@ -790,7 +790,6 @@ to enable ANSI colour and a number of other conveniences.
|
||||
--shift=8
|
||||
--squeeze-blank-lines
|
||||
--use-backslash
|
||||
--use-color
|
||||
).
|
||||
If these don't work well, you can set your preferred options in the `HLEDGER_LESS` variable, which will be used instead.
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user