Be a bit more flexible in terminal identification for do_bold
[ghc-hetmet.git] / compiler / ghci / InteractiveUI.hs
index 4d3d08d..ec1f4bf 100644 (file)
@@ -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"