pauloricardomg commented on code in PR #1866:
URL: https://github.com/apache/cassandra/pull/1866#discussion_r973841876
##########
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:
maybe make `hisotry_length-50` configurable as an environment variable
##########
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()
Review Comment:
fix typo `hisotry_length` -> `history_length`
--
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]