Created
June 5, 2017 14:55
-
-
Save mizunashi-mana/e8a1ac7a857df8a1d3a13b145b98e16d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ed :: [String] -> IO () | |
ed args = if null args | |
then do | |
x <- fromMaybe "" <$> runInputT defaultSettings (getInputLine "") | |
ed' (setCmd x) [] [] 1 True | |
else do | |
x <- createBuffer (head args) | |
y <- fromMaybe "" <$> runInputT defaultSettings (getInputLine "") | |
ed' (setCmd y) (head args) x 1 True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment