larinachen commented on code in PR #1866:
URL: https://github.com/apache/cassandra/pull/1866#discussion_r973861053
##########
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:
What about making history_length-50 configurable via an optional input
parameter instead? This way, the user doesn't have to re-configure an
environmental variable every time they want to view more/less. Let me know what
you think about the input parameter approach vs the environmental variable
approach!
--
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]