I am using http://terminal.jcubic.pl/ to create a jQuery terminal.
I want to change the prompt after user successfully logged in. For an example. I want to change the prompt to root@mac from #:
I am bit new to jQuery. Please help.
// This is how i create my terminal
var terminal = $('#jq_terminal').terminal(function(command, term) {
term.echo("you just typed " + command);
}, {
login: f_login,
greetings: "You are authenticated",
prompt: '#',
name: 'shell',
onBlur: function() {
return false;
}
});
// Login
function f_login(user, password, callback) {
// make a soket.IO call here. SocketIO will call f_login_response
}
// Login Response here
function f_login_response(user, password, callback) {
// How do I change the terminal prompt here ?
// I tried
terminal.prompt = '$'; // Does not work
}