From bf24ff9ffd25841da5e20386548fb63ff191ed9a Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 11 Jun 2016 23:00:13 +0200 Subject: Death & Unconsciousness --- default.nix | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'default.nix') diff --git a/default.nix b/default.nix index 4b974c3..b496745 100644 --- a/default.nix +++ b/default.nix @@ -56,6 +56,37 @@ rec { -- The shell description and utility functions -- 2.8.0 + + + From 20e394aa3ea287fcaacde9c076c9f49929b28ece Mon Sep 17 00:00:00 2001 + From: Gregor Kleen + Date: Sat, 11 Jun 2016 22:06:36 +0200 + Subject: [PATCH] Allow modification of state in beforePrompt + + --- + src/System/Console/Shell/RunShell.hs | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + + diff --git a/src/System/Console/Shell/RunShell.hs b/src/System/Console/Shell/RunShell.hs + index 79ffb54..3e0b95b 100644 + --- a/src/System/Console/Shell/RunShell.hs + +++ b/src/System/Console/Shell/RunShell.hs + @@ -217,9 +217,11 @@ shellLoop desc backend iss = loop + bst = backendState iss + + loop st = do + - flushOutput backend bst + + flushOutput backend bst + + + + runSh st (outputString backend bst) (beforePrompt desc) >>= loop' . fst + + - runSh st (outputString backend bst) (beforePrompt desc) + + loop' st = do + setAttemptedCompletionFunction backend bst + (completionFunction desc backend bst st) + + -- + 2.8.3 ''); }; }; -- cgit v1.2.3