Skip to content

Commit cd0eb7f

Browse files
authored
Merge pull request #2499 from midichef/input_do_not_record
[input-] honor record=False for input()
2 parents f5c07df + 528a568 commit cd0eb7f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

visidata/_input.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ def input(vd, prompt, type=None, defaultLast=False, history=[], dy=0, attr=None,
507507
- *history*: list of strings to use for input history.
508508
- *defaultLast*: on empty input, if True, return last history item.
509509
- *display*: pass False to not display input (for sensitive input, e.g. a password).
510-
- *record*: pass False to not record input on cmdlog (for sensitive or inconsequential input).
510+
- *record*: pass False to not record input on cmdlog or input history (for sensitive or inconsequential input).
511511
- *completer*: ``completer(val, idx)`` is called on TAB to get next completed value.
512512
- *updater*: ``updater(val)`` is called every keypress or timeout.
513513
- *bindings*: dict of keystroke to func(v, i) that returns updated (v, i)
@@ -551,7 +551,7 @@ def _drawPrompt(val=''):
551551
updater=_drawPrompt,
552552
**kwargs)
553553

554-
if ret:
554+
if ret and kwargs.get('record', True):
555555
vd.addInputHistory(ret, type=type)
556556

557557
elif defaultLast:

0 commit comments

Comments
 (0)