From d72da4a04692311952f03781dac9a4343447aa74 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Sat, 4 Dec 2021 18:03:41 +0100 Subject: Allow 'c' argument for auto-paste --- 2021/Input.hs | 2 ++ 1 file changed, 2 insertions(+) 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 -- cgit v1.2.3-54-g00ecf