pauloricardomg commented on code in PR #1866:
URL: https://github.com/apache/cassandra/pull/1866#discussion_r974311065


##########
bin/cqlsh.py:
##########
@@ -1881,6 +1881,21 @@ def do_clear(self, parsed):
         subprocess.call('clear', shell=True)
     do_cls = do_clear
 
+    def do_history(self,parsed):
+        """
+        history/HIS
+
+        Displays the most recent (up to 50) commands executed in cqlsh.
+        """
+        recent_history = ""
+        hisotry_length = readline.get_current_history_length()
+        for index in range(hisotry_length, hisotry_length-50, -1):

Review Comment:
   I think making the history length configurable via optional input parameter 
makes sense. We'd still want a configuration for the default length (ie. 50) 
when the parameter is not specified. This could be an environmental variable or 
a 
[cqlshrc](https://docs.datastax.com/en/dse/5.1/cql/cql/cql_reference/cqlsh_commands/cqlshCqlshrc.html)
 configuration. Perhaps we can start with an environment variable and later 
expand to allow the default size to be specified in `cqlshrc` ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to