summaryrefslogtreecommitdiff
path: root/shell/utils.js
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2009-06-08 11:20:30 -0400
committerEliot Horowitz <eliot@10gen.com>2009-06-08 11:20:30 -0400
commita38d2d26952a2148263005795528aa8c4a059dd0 (patch)
treed562858f6c1778a6184268c11e84c81b3ff6853b /shell/utils.js
parentf17f26a629100c8ab659cbf793c2478efc64be45 (diff)
downloadmongo-a38d2d26952a2148263005795528aa8c4a059dd0.tar.gz
re-implement it in shell
Diffstat (limited to 'shell/utils.js')
-rw-r--r--shell/utils.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/shell/utils.js b/shell/utils.js
index ea0b8208fbd..127fc28ae59 100644
--- a/shell/utils.js
+++ b/shell/utils.js
@@ -354,6 +354,14 @@ shellHelper.use = function( dbname ){
print( "switched to db " + db.getName() );
}
+shellHelper.it = function(){
+ if ( typeof( ___it___ ) == "undefined" || ___it___ == null ){
+ print( "no cursor" );
+ return;
+ }
+ shellPrintHelper( ___it___ );
+}
+
shellHelper.show = function( what ){
assert( typeof what == "string" );