From 9efeaae7dd6d720b0f44b0a73ed4881d7eb41034 Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Thu, 27 Sep 2007 14:15:49 +0000 Subject: [PATCH] Be a bit more flexible in terminal identification for do_bold In Os X for instance, by default we have TERM=xterm-color MERGE TO STABLE --- compiler/ghci/InteractiveUI.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/ghci/InteractiveUI.hs b/compiler/ghci/InteractiveUI.hs index 4d3d08d..ec1f4bf 100644 --- a/compiler/ghci/InteractiveUI.hs +++ b/compiler/ghci/InteractiveUI.hs @@ -1818,7 +1818,7 @@ findBreakByCoord mb_file (line, col) arr -- TERM to vt100 for other reasons) we get carets. -- We really ought to use a proper termcap/terminfo library. do_bold :: Bool -do_bold = unsafePerformIO mTerm `elem` ["xterm", "linux"] +do_bold = (`isPrefixOf` unsafePerformIO mTerm) `any` ["xterm", "linux"] where mTerm = System.Environment.getEnv "TERM" `Exception.catch` \e -> return "TERM not set" -- 1.7.10.4