Skip to content

Commit

Permalink
TTY access is not necessary for editor
Browse files Browse the repository at this point in the history
  • Loading branch information
fmthoma committed Dec 28, 2016
1 parent d1121a3 commit 9b1d51e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
8 changes: 1 addition & 7 deletions app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import System.Directory
import System.Environment (getArgs)
import System.Exit
import System.IO
import System.Posix.IO
import System.Process

import Vgrep.App as App
Expand Down Expand Up @@ -227,13 +226,8 @@ invokeEditor state = case views (results . currentFileName) (fmap T.unpack) stat

exec :: MonadIO io => FilePath -> [String] -> io ()
exec command args = liftIO $ do
inHandle <- fdToHandle =<< ttyIn
outHandle <- fdToHandle =<< ttyOut
(_,_,_,h) <- createProcess $ (proc command args)
{ std_in = UseHandle inHandle
, std_out = UseHandle outHandle }
_ <- waitForProcess h
return ()
void (waitForProcess h)

---------------------------------------------------------------------------
-- Lenses
Expand Down
1 change: 0 additions & 1 deletion vgrep.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ executable vgrep
, process >= 1.2.3
, template-haskell >= 2.10
, text >= 1.2.1.3
, unix >= 2.7.1
, vgrep
, vty >= 5.4.0
default-language: Haskell2010
Expand Down

0 comments on commit 9b1d51e

Please sign in to comment.