From d516d4df7c7d4cb0c9ca88d0889e806a7a43b13d Mon Sep 17 00:00:00 2001 From: Jean Bruenn Date: Tue, 8 Sep 2015 14:08:44 +0200 Subject: [PATCH] Update main.js just a tiny change, if you are using the demo file as example to start working with, prompt as variable might cause trouble if you do use prompt() rather use shellprompt as variable name instead of prompt. I'd suggest to rename term's prompt() as well to not cause confusion. --- demo/main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/demo/main.js b/demo/main.js index a4b1dd8..d9bc928 100644 --- a/demo/main.js +++ b/demo/main.js @@ -1,12 +1,12 @@ var terminalContainer = document.getElementById('terminal-container'), term = new Terminal(), - prompt = '> '; + shellprompt = '> '; term.open(terminalContainer); term.fit(); term.prompt = function () { - term.write('\r\n' + prompt); + term.write('\r\n' + shellprompt); }; term.writeln('Welcome to xterm.js'); @@ -29,4 +29,4 @@ term.on('key', function (key, ev) { } else if (printable) { term.write(key); } -}); \ No newline at end of file +});