|
@@ -68,7 +68,8 @@
|
|
|
* - Make the input safe by transforming html entities.
|
|
* - Make the input safe by transforming html entities.
|
|
|
* - Keep the last command in history as we go to the next line.
|
|
* - Keep the last command in history as we go to the next line.
|
|
|
* - Based on shell response, perform special actions or append the output.
|
|
* - Based on shell response, perform special actions or append the output.
|
|
|
- * - Update the prompt as required.
|
|
|
|
|
|
|
+ * - Set the prompt as required.
|
|
|
|
|
+ * - Make sure all tags update their display content.
|
|
|
*/
|
|
*/
|
|
|
process(prompt, input) {
|
|
process(prompt, input) {
|
|
|
input = he.encode(input)
|
|
input = he.encode(input)
|
|
@@ -83,11 +84,11 @@
|
|
|
}
|
|
}
|
|
|
this.tags.commandline.setPrompt(this.shell.prompt)
|
|
this.tags.commandline.setPrompt(this.shell.prompt)
|
|
|
this.tags.commandline.command.value = ''
|
|
this.tags.commandline.command.value = ''
|
|
|
|
|
+ this.update()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
clear() {
|
|
clear() {
|
|
|
this.tags.history.hist = []
|
|
this.tags.history.hist = []
|
|
|
- this.update()
|
|
|
|
|
}
|
|
}
|
|
|
</terminal>
|
|
</terminal>
|
|
|
|
|
|
|
@@ -122,11 +123,11 @@
|
|
|
if (typeof this.tags.lhs.write != 'undefined') {
|
|
if (typeof this.tags.lhs.write != 'undefined') {
|
|
|
this.tags.lhs.write(value)
|
|
this.tags.lhs.write(value)
|
|
|
}
|
|
}
|
|
|
- this.update({ 'prompt': value })
|
|
|
|
|
|
|
+ this.prompt = value
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- process(e) {
|
|
|
|
|
|
|
+ process() {
|
|
|
this.parent.process(this.prompt, this.command.value)
|
|
this.parent.process(this.prompt, this.command.value)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -143,7 +144,6 @@
|
|
|
if (output) {
|
|
if (output) {
|
|
|
output = this.preserveWhiteSpace(output)
|
|
output = this.preserveWhiteSpace(output)
|
|
|
this.hist.push({ 'content': output })
|
|
this.hist.push({ 'content': output })
|
|
|
- this.update()
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|