read-editor-0.1.0.2: Opens a temporary file on the system's EDITOR and returns the resulting edits

Safe HaskellSafe
LanguageHaskell2010

System.ReadEditor

Contents

Synopsis

Main exports

readEditor :: IO String #

Opens a file in the sytem's editor and returns it's contents after it's saved.

readEditorWith :: String -> IO String #

Opens a file, fills it some content and returns it's contents after it's saved.

openEditor :: FilePath -> IO () #

Opens a file in the sytem's editor, waits until it's closed.

openEditorWithPrompt :: String -> FilePath -> IO () #

A version of openEditor which takes the fallback prompt question.

Utility

prompt :: String -> IO String #

Prompts for a line and returns it

withSystemTempFile :: String -> (FilePath -> Handle -> IO a) -> IO a #

Executes a function with an open temporary file Handle.