-
Type: New Feature
-
Resolution: Done
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Shell
-
None
-
Fully Compatible
(1) the mongo shell prompt should tell one more about contect when connected. for example if connected to a mongod and it is a member of a replica set, the prompt should tell you the server's state. something like
primary>
or
secondary>
or
arbiter>
If connecting from the shell to an entire set, it will be important that the user know which node to which it is currently active. So this could be something like
myset:sf1:primary>
where myset is the set name, sf1 host name to which we are connected, and primary the state of sf1 currently.
likewise with sharding similar things. if connected to a mongos, we should somehow indicate that. maybe
s>
if connected to a mongo in a particular shard, indicate that
shard3:sf1>
if connected to a config server, indicate that
cfg:sf1>
not for 1.6 but useful later.
also we can make this configurable – we can have a prompt() js function that returns a string, with the above being a default.