X Tutup
Skip to content

Commit 9ffc63f

Browse files
committed
Do not add internal code to history.
1 parent c63adce commit 9ffc63f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bpython/cli.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -870,11 +870,11 @@ def prompt(self, more):
870870
self.s_hist.append('\x01%s\x03... \x04' %
871871
(OPTS.color_scheme['prompt_more'],))
872872

873-
def push(self, s):
873+
def push(self, s, insert_into_history=True):
874874
# curses.raw(True) prevents C-c from causing a SIGINT
875875
curses.raw(True)
876876
try:
877-
return Repl.push(self, s)
877+
return Repl.push(self, s, insert_into_history)
878878
finally:
879879
curses.raw(True)
880880

@@ -905,7 +905,7 @@ def repl(self):
905905

906906
# Use our own helper function because Python's will use real stdin and
907907
# stdout instead of our wrapped
908-
self.push('from bpython._internal import _help as help\n')
908+
self.push('from bpython._internal import _help as help\n', False)
909909

910910
self.iy, self.ix = self.scr.getyx()
911911
more = False

0 commit comments

Comments
 (0)
X Tutup