projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bd3922f
)
Be a bit more flexible in terminal identification for do_bold
author
Pepe Iborra
<mnislaih@gmail.com>
Thu, 27 Sep 2007 14:15:49 +0000
(14:15 +0000)
committer
Pepe Iborra
<mnislaih@gmail.com>
Thu, 27 Sep 2007 14:15:49 +0000
(14:15 +0000)
In Os X for instance, by default we have TERM=xterm-color
MERGE TO STABLE
compiler/ghci/InteractiveUI.hs
patch
|
blob
|
history
diff --git
a/compiler/ghci/InteractiveUI.hs
b/compiler/ghci/InteractiveUI.hs
index
4d3d08d
..
ec1f4bf
100644
(file)
--- 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"