summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2018-03-15 14:01:04 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2018-03-15 14:01:04 -0400
commit735b4cd6441afbbdd583cb490dd797baa55910c6 (patch)
tree3af6f71ea0bbbc5c41eefdf91935c16cdbfb053c
parent8ff2f1c1dcf9a6d2e7d56f47079c5c2e3d38f63d (diff)
parentc357f9b04b96ca31d26003e7e71e4f95a95a02e3 (diff)
downloadcmd2-git-735b4cd6441afbbdd583cb490dd797baa55910c6.tar.gz
Merge branch 'master' into moresub
-rwxr-xr-xcmd2.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd2.py b/cmd2.py
index 4460ea39..2da007a5 100755
--- a/cmd2.py
+++ b/cmd2.py
@@ -2029,6 +2029,9 @@ class Cmd(cmd.Cmd):
self.poutput(' %2d. %s\n' % (idx + 1, text))
while True:
response = sm.input(prompt)
+ hlen = readline.get_current_history_length()
+ if hlen >= 1 and response != '':
+ readline.remove_history_item(hlen - 1)
try:
response = int(response)
result = fulloptions[response - 1][0]