private static string[] GetTabCompletionOutputs(string guid, string command, bool lastTokenOnly) { var session = GetScriptSession(guid); try { var result = CommandCompletion.FindMatches(session, command, lastTokenOnly); return(result.ToArray()); } finally { if (string.IsNullOrEmpty(guid)) { ScriptSessionManager.RemoveSession(session); } } }