-
Type: New Feature
-
Resolution: Won't Do
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Shell
-
None
It's common to jump between a number of databases in the shell. Having to type (even remember) the full name every time can be time consuming. It would be helpful for the shell to maintain a simple stack to jump between databases quickly.
e.g.
// Push another DB onto stack (and change to it)
pushDb('some_db');
// Pop current DB and change to new head.
popDb();
// Switch top two DBs (ala unix shell noarg pushd)
pushDb();
// Bring database at depth n to top of stack
pushDb;
// Show current stack
listDbStack();
// Discard stack
clearDbStack();
There is a related feature request to tab-complete database names in the shell. With these two features, the efficiency of a mongodb shell session could be enhanced.