private void OnEnable() { keyMap = new KeyMap(); replMode = new Mode("repl", keyMap: keyMap); replBuffer = new Buffer("repl"); replBuffer.EnabeMajorMode(replMode); replBuffer.EnabeMinorMode(ReadLine.Instance); replBuffer.Enable(); ReadLine.Instance.AutoCompletionListener += AutoCompletionHandler; // define some functions NativeFunction.Define("help", Help, "Display short help for commands."); NativeFunction.Define("man", Man, "Display manual for the command. It works only if 'man' contains manual for given command."); ReadLine.Instance.Read(prompt, Evaluate); Application.logMessageReceived += HandleLog; }