diff options
author | terminaldweller <thabogre@gmail.com> | 2022-05-05 15:17:33 +0000 |
---|---|---|
committer | terminaldweller <thabogre@gmail.com> | 2022-05-05 15:17:33 +0000 |
commit | f723eec9bac125536b3b956d9eb26fea8fb60deb (patch) | |
tree | 2fb071ee2d70c071d84bf255c6ccfeee725cf6ec /.mongoshrc.js | |
parent | more updates for irssi (diff) | |
download | scripts-f723eec9bac125536b3b956d9eb26fea8fb60deb.tar.gz scripts-f723eec9bac125536b3b956d9eb26fea8fb60deb.zip |
update
Diffstat (limited to '.mongoshrc.js')
-rw-r--r-- | .mongoshrc.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/.mongoshrc.js b/.mongoshrc.js new file mode 100644 index 0000000..493e925 --- /dev/null +++ b/.mongoshrc.js @@ -0,0 +1,12 @@ +{ + const hostnameSymbol = Symbol("hostname"); + prompt = () => { + if (!db[hostnameSymbol]) db[hostnameSymbol] = db.serverStatus().host; + return `\x1b[38;5;22m${db.getName()}\x1b[38;5;24m@${ + db[hostnameSymbol] + }\x1b[38;5;22m:Uptime:${db.serverStatus().uptime}:Documents:${ + db.stats().objects + } >>>\x1b[0m`; + ; + }; +} |