<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:04:46 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-4034] Command line history in the shell could be better</title>
                <link>https://jira.mongodb.org/browse/SERVER-4034</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The command line history feature of the shell tends to accumulate multiple copies of commands when it is used.  The only test for preventing duplicate commands from being stored is a comparison with the immediately preceding command, so if you up-arrow three times and hit return, you get a new copy of the old command.  The bash shell seems to be a lot smarter about this.  We should try to be closer to bash in handling history.&lt;/p&gt;

&lt;p&gt;A second thought (sorry for two thoughts in one bug report, but they are related) is that the Windows command line (cmd.exe) has a feature that bash doesn&apos;t have.  In Windows, if your most recent command was retrieved by using up-arrow, then that position is remembered as a &quot;special&quot; location, and if your next keystroke is down-arrow, then the command that followed the one that you just retrieved is recalled, and the special location is updated.  This has no effect on what happens on up-arrow and doesn&apos;t &quot;rotate the list&quot; or anything like that.  It&apos;s just a simple hack that lets you issue five commands in sequence and then recall them in the same sequence later.  It doesn&apos;t break compatibility with bash or other shells because other shells just ignore a down-arrow when you haven&apos;t already recalled a command with up-arrow.  The reason that I mention this is that it can be very convenient, and Windows users might try it and hope that it is there.  If we implement it, we could consider doing it for all versions and not just Windows versions.  It can save a lot of keystrokes in some situations and feel very friendly.&lt;/p&gt;

&lt;p&gt;&amp;gt; my first command &lt;span class=&quot;error&quot;&gt;&amp;#91;hit enter&amp;#93;&lt;/span&gt;&lt;br/&gt;
&amp;gt; my second command &lt;span class=&quot;error&quot;&gt;&amp;#91;enter&amp;#93;&lt;/span&gt;&lt;br/&gt;
&amp;gt; my third command &lt;span class=&quot;error&quot;&gt;&amp;#91;enter&amp;#93;&lt;/span&gt;&lt;br/&gt;
&amp;gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;up-arrow&amp;#93;&lt;/span&gt; twice shows &quot;my second command&quot; ... &lt;span class=&quot;error&quot;&gt;&amp;#91;hit enter&amp;#93;&lt;/span&gt;&lt;br/&gt;
&amp;gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;down-arrow&amp;#93;&lt;/span&gt; on Windows (DOS) command line, this shows &quot;my third command&quot;, on bash it does nothing&lt;/p&gt;

&lt;p&gt;At the Windows (DOS) command line, down-arrow behaves just like bash if your immediately preceding entry wasn&apos;t a recalled command or if the command was edited (changed) before you hit return.  Its only appearance as a feature is when you are recalling a sequence of commands.&lt;/p&gt;</description>
                <environment>Any</environment>
        <key id="23360">SERVER-4034</key>
            <summary>Command line history in the shell could be better</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="9">Done</resolution>
                                        <assignee username="tad">Tad Marshall</assignee>
                                    <reporter username="tad">Tad Marshall</reporter>
                        <labels>
                    </labels>
                <created>Fri, 7 Oct 2011 15:31:17 +0000</created>
                <updated>Mon, 11 Jul 2016 18:32:21 +0000</updated>
                            <resolved>Thu, 5 Jan 2012 05:55:23 +0000</resolved>
                                    <version>2.0.0</version>
                                    <fixVersion>2.1.0</fixVersion>
                                    <component>Shell</component>
                                        <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="77725" author="auto" created="Thu, 5 Jan 2012 05:41:09 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;&apos;, u&apos;name&apos;: u&apos;Tad Marshall&apos;, u&apos;email&apos;: u&apos;tad@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-4034&quot; title=&quot;Command line history in the shell could be better&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-4034&quot;&gt;&lt;del&gt;SERVER-4034&lt;/del&gt;&lt;/a&gt; fix broken logic, add new logic in cmd history&lt;/p&gt;

&lt;p&gt;Don&apos;t store edited but un-entered command in history.  Add code&lt;br/&gt;
to emulate what the Windows command line does on an initial down-&lt;br/&gt;
arrow after recalling a previous command: fetch the following&lt;br/&gt;
command, so replaying a sequence of commands is easier.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/90a86ec1363e692f393d0421754196d621bbef44&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/90a86ec1363e692f393d0421754196d621bbef44&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="77702" author="tad" created="Thu, 5 Jan 2012 01:34:09 +0000"  >&lt;p&gt;Here&apos;s a quick test to show bugginess in the 2.0 code:&lt;/p&gt;

&lt;p&gt;C:\Bin\MongoDB\202&amp;gt; mongo&lt;br/&gt;
MongoDB shell version: 2.0.2&lt;br/&gt;
connecting to: test&lt;br/&gt;
&amp;gt; // This line is perfect!&lt;br/&gt;
&amp;gt; // just another line&lt;br/&gt;
&amp;gt;&lt;br/&gt;
Now press up-arrow to get to the &quot;perfect&quot; line and change it, but don&apos;t hit return yet.&lt;br/&gt;
&amp;gt; // This line is RUINED&lt;br/&gt;
Now press down-arrow and return.&lt;br/&gt;
&amp;gt; // just another line&lt;br/&gt;
Now try press up-arrow and try to find your &quot;perfect&quot; line.  It is gone, and has been replaced with the UN-ENTERED edit you made ... your history says that you entered a line saying &quot;This line is RUINED&quot; even though you didn&apos;t, and the line that you actually entered is no longer in the history.  Bad shell, BAD!&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>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 5 Jan 2012 05:41:09 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        12 years, 6 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>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            12 years, 6 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>auto</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|hrookv:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8147</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|ht0rpj:</customfieldvalue>

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