[SERVER-1939] having connection information in mongo shell Created: 13/Oct/10  Updated: 12/Jul/16  Resolved: 29/Jul/11

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 1.9.1

Type: New Feature Priority: Minor - P4
Reporter: Vitaliyi Senchev Assignee: Matt Dannenberg
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

mongo shell


Issue Links:
Related
Participants:

 Description   

We would like to see more info in the shell prompt, not just '>'

Oracle has it in the glogin
$ORACLE_HOME/sqlplus/admin/glogin.sql

SET SQLPROMPT '&_user:&_CONNECT_IDENTIFIER > '



 Comments   
Comment by Matt Dannenberg [ 29/Jul/11 ]

our new custom prompt functionality allows for this:
http://www.mongodb.org/display/DOCS/Overview+-+The+MongoDB+Interactive+Shell#Overview-TheMongoDBInteractiveShell-CustomPrompt

also, you can have the .mongorc.js contain this function so that you don't need to rewrite it each time

Generated at Thu Feb 08 02:58:31 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.