Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module Main where
- import Data.List
- import System.Environment
- import System.Directory
- import System.Process
- getFirstPathArg :: [String] -> String
- getFirstPathArg [] = error "No Path Found"
- getFirstPathArg (arg : rest)
- | not $ isPrefixOf "+" arg = arg
- | otherwise = getFirstPathArg rest
- main = do
- let notepadDir = "C:/Program Files (x86)/Notepad++/notepad++.exe"
- args <- getArgs
- let fileName = getFirstPathArg args
- curDir <- getCurrentDirectory
- runProcess
- notepadDir
- [fileName]
- (Just curDir)
- Nothing
- Nothing
- Nothing
- Nothing
- return ()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement