aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS_TheReturn
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-07-31 22:48:17 -0400
committerMichael <[email protected]>2017-07-31 22:48:17 -0400
commitb8da7357b00c9fb11c48ed697972f284d182feae (patch)
tree6a6a59b50aa610737b50e4be8063242d2e9b9fc7 /ShiftOS_TheReturn
parent1c9767380fca1ecda794b207737d3c4ec4cfaa82 (diff)
downloadshiftos_thereturn-b8da7357b00c9fb11c48ed697972f284d182feae.tar.gz
shiftos_thereturn-b8da7357b00c9fb11c48ed697972f284d182feae.tar.bz2
shiftos_thereturn-b8da7357b00c9fb11c48ed697972f284d182feae.zip
adjust textcache purge
Diffstat (limited to 'ShiftOS_TheReturn')
-rw-r--r--ShiftOS_TheReturn/TerminalBackend.cs16
1 files changed, 6 insertions, 10 deletions
diff --git a/ShiftOS_TheReturn/TerminalBackend.cs b/ShiftOS_TheReturn/TerminalBackend.cs
index dcc4625..4e7392e 100644
--- a/ShiftOS_TheReturn/TerminalBackend.cs
+++ b/ShiftOS_TheReturn/TerminalBackend.cs
@@ -231,11 +231,13 @@ namespace ShiftOS.Engine
try
{
CommandHandler.Invoke(null, new[] { args });
+
}
catch
{
CommandHandler.Invoke(null, null);
}
+ CommandFinished?.Invoke(Localization.Parse(this.CommandInfo.name), args);
}
}
@@ -270,6 +272,8 @@ namespace ShiftOS.Engine
}
+ public static event Action<string, Dictionary<string, object>> CommandFinished;
+
public class MemoryTextWriter : System.IO.TextWriter
{
public override Encoding Encoding
@@ -402,14 +406,12 @@ namespace ShiftOS.Engine
{
if (string.IsNullOrWhiteSpace(text))
return;
- var tw = new MemoryTextWriter();
- Console.SetOut(tw);
+ var args = GetArgs(ref text);
+ var oargs = JsonConvert.DeserializeObject<Dictionary<string, object>>(GetSentArgs(args));
try
{
- var args = GetArgs(ref text);
bool commandWasClient = RunClient(text, args, isRemote);
-
if (!commandWasClient)
{
Console.WriteLine("Error: Command not found.");
@@ -423,12 +425,6 @@ namespace ShiftOS.Engine
PrefixEnabled = true;
}
- string buffer = tw.ToString();
- LastCommandBuffer = buffer;
- Console.SetOut(new TerminalTextWriter());
- if(!isRemote)
- Console.Write(buffer);
-
}
/// <summary>