summaryrefslogtreecommitdiff
path: root/src/GF/Shell.hs
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2008-03-06 21:27:14 +0000
committeraarne <aarne@cs.chalmers.se>2008-03-06 21:27:14 +0000
commit27508654c01c5ebad3c495629ccbd49c067429ab (patch)
tree440e4ec729664e71a29e8d33d8fdcb7af3757a15 /src/GF/Shell.hs
parentfe863958533cd905939241e6fa50af439058cf5a (diff)
option -mac to vt command (uses open with ps)
Diffstat (limited to 'src/GF/Shell.hs')
-rw-r--r--src/GF/Shell.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/GF/Shell.hs b/src/GF/Shell.hs
index e0b01f18f..b884534bd 100644
--- a/src/GF/Shell.hs
+++ b/src/GF/Shell.hs
@@ -365,9 +365,10 @@ execC co@(comm, opts0) sa@(sh@(st,(h,_,_,_)),a) = checkOptions st co >> case com
CShowTreeGraph | oElem emitCode opts -> do -- -o
returnArg (AString $ visualizeTrees opts $ strees $ s2t a) sa
CShowTreeGraph -> do
+ let gv = if oElem (iOpt "mac") opts then "open" else "gv" ---- config!
let g0 = writeFile "grphtmp.dot" $ visualizeTrees opts $ strees $ s2t a
g1 = system "dot -Tps grphtmp.dot >grphtmp.ps"
- g2 = system "gv grphtmp.ps &"
+ g2 = system (gv +++ "grphtmp.ps &")
g3 = return () ---- system "rm -f grphtmp.*"
justOutput opts (g0 >> g1 >> g2 >> g3 >> return ()) sa
@@ -453,9 +454,10 @@ execC co@(comm, opts0) sa@(sh@(st,(h,_,_,_)),a) = checkOptions st co >> case com
returnArg (AString (optPrintMultiGrammar opts cgr')) sa
CShowGrammarGraph -> do
---- sa' <- changeState purgeShellState sa
+ let gv = if oElem (iOpt "mac") opts then "open" else "gv" ---- config!
let g0 = writeFile "grphtmp.dot" $ visualizeCanonGrammar opts cgr
g1 = system "dot -Tps grphtmp.dot >grphtmp.ps"
- g2 = system "gv grphtmp.ps &"
+ g2 = system (gv +++ "grphtmp.ps &")
g3 = return () ---- system "rm -f grphtmp.*"
justOutput opts (g0 >> g1 >> g2 >> g3 >> return ()) sa
CPrintSourceGrammar ->