Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Launching Programs (example: Vim) from Haskell

Tags:

Using the Turtle shell scripting library I am trying to launch a program, i.e:

shell "vim" empty

The problem is that this yields the warning Warning: Input is not from a terminal and causes Vim to lag for a few seconds before finally launching.

Questions:

  1. Is shell the best Turtle function to launch an external program from haskell?
  2. If so, is there any way to get around errors like the above?
like image 360
George Avatar asked May 17 '17 04:05

George


1 Answers

You want to use functions from the process library, specifically createProcess or runProcess.

Relevant turtle thread on the issue here.

Example usage.

like image 50
soupi Avatar answered Sep 23 '22 10:09

soupi