[SERVER-2533] Add a clear function to the shell Created: 11/Feb/11  Updated: 12/Jul/16  Resolved: 29/Jun/11

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

Type: Improvement Priority: Minor - P4
Reporter: Ryan Nitz Assignee: Matt Dannenberg
Resolution: Done Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

It would be nice to be able to type the following in the shell:

clear

(and have it clear the content on the screen)



 Comments   
Comment by Ryan Nitz [ 19/Nov/11 ]

Everyone please vote for this issue (upper right corner of the page).

Comment by Ben Burton [ 19/Nov/11 ]

MongoDB 1.8.2 with OS X 10.6.8 here... CTRL+L only gives me a newline

Comment by Matt Dannenberg [ 29/Jun/11 ]

Ctrl+L works since we switched to linenoise from readline (tested in ubuntu 10.04, windows xp, and os x)

Comment by Ryan Nitz [ 17/May/11 ]

I've been able to recreate CTRL-l not working.

When I ssh to another machine and open a shell on that machine, I see the behavior described above. On Ubuntu, it goes to the next line and on the AWS linux AMI, it does nothing.

After more investigation, this appears to not be a feature in the Mongo shell as much as a feature terminal programs on OS X.

+1 for a clear function/command in the shell

Comment by Juan Gomez [ 11/May/11 ]

It doesn't work for me either, I get the same behavior, Ctrl + L creates a a new line.

I'm on OS X 10.6 and MongoDB 1.8.0. This is the system info printed when Mongo starts:

Tue May 10 21:05:24 [initandlisten] MongoDB starting : pid=231 port=27017 dbpath=/data/db/ 64-bit
Tue May 10 21:05:24 [initandlisten] db version v1.8.0, pdfile version 4.5
Tue May 10 21:05:24 [initandlisten] git version: 9c28b1d608df0ed6ebe791f63682370082da41c0
Tue May 10 21:05:24 [initandlisten] build sys info: Darwin erh2.10gen.cc 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386 BOOST_LIB_VERSION=1_40

Comment by Sunil Bhanot [ 10/May/11 ]

1.6.5 and OS X is what I have.

Comment by Ryan Nitz [ 10/May/11 ]

I confirmed it runs on OS X in the 1.6.5 shell.

If you're on another platform, check and see if you have terminal or OS overrides.

Comment by Sunil Bhanot [ 10/May/11 ]

1.6.5

Comment by Ryan Nitz [ 10/May/11 ]

It clears the entire screen. What version/platform are you running?

Comment by Sunil Bhanot [ 10/May/11 ]

Ctrl + L is only going to the next line. Am I missing something?

Comment by Ryan Nitz [ 10/May/11 ]

Yes... that works great, but is a little difficult to discover.

Comment by Dwight Merriman [ 10/May/11 ]

Ctrl-L works i believe (good from the console not so helpful from a script)

Generated at Thu Feb 08 03:00:19 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.