blob: 43424dd05412b0e4e770c2a044ad2df3da4a5188 (
plain) (
tree)
|
|
function prompt() {
var username = "";
var user = db.runCommand({
connectionStatus: 1
}).authInfo.authenticatedUsers[0];
if (!!user) {
username = user.user;
} else {
username = "anonymous";
}
var database = db.getName();
return `${username}:${database} >`;
}
|