<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:04:49 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[SERVER-4053] Suggestion: allow optional use of readline</title>
                <link>https://jira.mongodb.org/browse/SERVER-4053</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;In switching from readline to linenoise in version 1.9, a lot of functionality was given up and some bugs were introduced.  linenoise is workable, maintainable code and can be improved over time.  But it doesn&apos;t do what readline did and probably never will.&lt;/p&gt;

&lt;p&gt;For users who are heavy users of readline-style functionality such as history search, kill rings and support for non-VT100-style terminals, it can be a disappointment to lose those features in an upgrade of MongoDB.&lt;/p&gt;

&lt;p&gt;A workaround for those users would be to link to readline on-the-fly when asked to by a command line switch, and environment variable or a JavaScript setting in .mongorc.js .&lt;/p&gt;

&lt;p&gt;export MONGOSHELL=--use-readline&lt;/p&gt;

&lt;p&gt;or&lt;/p&gt;

&lt;p&gt;cat ~/.mongorc.js&lt;br/&gt;
MONGOSHELL=&quot;--use-readline&quot;&lt;/p&gt;

&lt;p&gt;or&lt;/p&gt;

&lt;p&gt;./mongo --use-readline&lt;/p&gt;

&lt;p&gt;We could load libreadline.so or let the user force a specific version.&lt;/p&gt;

&lt;p&gt;./mongo --use-readline=/lib/libreadline.so.5.2&lt;/p&gt;

&lt;p&gt;Internally, we would let shell/dbshell.cpp deal with whether the user asked us to do this, and then hand the issue off to linenoise.&lt;/p&gt;

&lt;p&gt;char * errorString = linenoiseUseReadline(char * readlinePath); // readlinePath == 0 means &quot;figure it out yourself&quot;&lt;/p&gt;

&lt;p&gt;If errorString != 0 we could display it.  Regardless of what linenoise returned, dbshell would call the same linenoise functions and linenoise would either call readline or handle everything itself.  This puts the burden of supporting readline on linenoise and keeps it out the the client&apos;s areas of concern.&lt;/p&gt;

&lt;p&gt;At one level of stretch, we could do this automatically by default, and make the user ask us not to do it if they really didn&apos;t want it.&lt;/p&gt;

&lt;p&gt;./mongo --use-readline=no&lt;/p&gt;

&lt;p&gt;At level two of stretch, we could do this for Windows, using either Cygwin or &quot;Readline for Windows&quot; (&lt;a href=&quot;http://gnuwin32.sourceforge.net/packages/readline.htm&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://gnuwin32.sourceforge.net/packages/readline.htm&lt;/a&gt;).  Readline for Windows exports 551 symbols and looks like a complete version with proper Win32 support.&lt;/p&gt;

&lt;p&gt;.\mongo --use-readline=&quot;C:\Program Files (x86)\GnuWin32\bin\readline5.dll&quot;&lt;/p&gt;

&lt;p&gt;This isn&apos;t so much a feature as a workaround.  Anyone attached to readline can stay in their comfort zone when upgrading MongoDB.  Anyone having issues with SecureCRT or any other terminal program can try using readline and see if the problem goes away.  Tech supporters get another option to suggest, users get more stuff to configure if they feel like it (but normal documented default behavior if they don&apos;t) and power users feel their power.  A little coding to make this work, and everybody wins.&lt;/p&gt;

&lt;p&gt;The reason this is possible is because the interfaces and usage of them is mostly the same between readline and linenoise.  linenoise was written to be a (much) smaller replacement for readline and the calls and callbacks are pretty much the same.  readline is old, crufty code written in Unix-oriented C using pre-ANSI C function declarations and tons of global variables, but it does an amazing amount of stuff and it is battle-tested, stable and standard.  bash calls it.  linenoise is newer (2010) and fits comfortably into a single .cpp file.  Our (changed) copy works on Windows and VT100-style terminals (i.e. most Unix-like systems) and is a fine solution for many people.  Opening up the readline option for people who need it would just increase the number of addressable users and increase the support options for people with issues.&lt;/p&gt;</description>
                <environment></environment>
        <key id="23479">SERVER-4053</key>
            <summary>Suggestion: allow optional use of readline</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="2">Won&apos;t Fix</resolution>
                                        <assignee username="tad">Tad Marshall</assignee>
                                    <reporter username="tad">Tad Marshall</reporter>
                        <labels>
                    </labels>
                <created>Tue, 11 Oct 2011 04:27:47 +0000</created>
                <updated>Wed, 29 Feb 2012 03:53:45 +0000</updated>
                            <resolved>Thu, 1 Dec 2011 13:26:00 +0000</resolved>
                                                                    <component>Shell</component>
                                        <votes>4</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="70044" author="eliot" created="Thu, 1 Dec 2011 13:26:00 +0000"  >&lt;p&gt;Maintaining 2 versions is complicated.&lt;br/&gt;
Need to just make 1 work really well&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 1 Dec 2011 13:26:00 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        12 years, 11 weeks, 6 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>ian@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            12 years, 11 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>tad</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hroobb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrg7m7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8139</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|ht0cwf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>