[SERVER-5134] Allow "edit" feature to create new variables Created: 28/Feb/12  Updated: 15/Feb/13  Resolved: 08/Dec/12

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

Type: Improvement Priority: Minor - P4
Reporter: Kristina Chodorow (Inactive) Assignee: Tad Marshall
Resolution: Duplicate Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-6325 using the `edit` command on undeclare... Closed
Related
related to SERVER-5744 `edit` shell command should be more f... Closed
Participants:

 Description   

It would be nice to be able to do:

> edit x

instead of

> var x
> edit x



 Comments   
Comment by Tad Marshall [ 08/Dec/12 ]

This feature was added by:

Author:

{u'date': u'2012-11-26T18:38:56Z', u'email': u'samantha.ritter@10gen.com', u'name': u'Samantha Ritter'}

Message: SERVER-6325 allow user to edit previously undeclared variables

Signed-off-by: Tad Marshall <tad@10gen.com>
Branch: master
https://github.com/mongodb/mongo/commit/703051921448696681b9db910667ead0f2761367

fixing SERVER-6325. I'll resolve this as a dupe.

Comment by Tad Marshall [ 16/Apr/12 ]

This is trivial if we want to do it. Line 464 is today's shell/dbshell.cpp does a return if the variable is not found. If the logic was tweaked, it could set the "variable"'s value to "" and the rest of the code would do the desired thing.

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