diff options
author | Tom Smeding <tom@tomsmeding.com> | 2021-12-04 18:03:41 +0100 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2021-12-04 18:03:41 +0100 |
commit | d72da4a04692311952f03781dac9a4343447aa74 (patch) | |
tree | 11bfb622a66b4f9800f888db99a3ddc98995a655 /2021 | |
parent | e0632dd35e0dd6491397514d09ad273f4d1e0392 (diff) |
Allow 'c' argument for auto-paste
Diffstat (limited to '2021')
-rw-r--r-- | 2021/Input.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/2021/Input.hs b/2021/Input.hs index afce44e..be95b9b 100644 --- a/2021/Input.hs +++ b/2021/Input.hs @@ -2,6 +2,7 @@ module Input where import System.Environment import System.IO +import System.Process getInput :: Int -> IO [String] @@ -12,6 +13,7 @@ getInput day = do str <- case args of ["-"] -> getContents [] -> readFile fname + ["c"] -> readProcess "xsel" ["-bo"] "" _ -> do hPutStrLn stderr $ "WARNING: Unrecognised command-line parameters " ++ show args ++ ", reading from " ++ fname |