From efbe84e6d89ab1442a45f4a6a651b4791f61d175 Mon Sep 17 00:00:00 2001 From: midichef <67946319+midichef@users.noreply.github.com> Date: Mon, 16 Dec 2024 17:13:51 -0800 Subject: [PATCH] [main-] enable cell editing for interactive batch mode --- visidata/_input.py | 2 +- visidata/form.py | 2 +- visidata/main.py | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/visidata/_input.py b/visidata/_input.py index 0bef336e5..d365856eb 100644 --- a/visidata/_input.py +++ b/visidata/_input.py @@ -576,7 +576,7 @@ def _drawPrompt(val=''): @VisiData.api def confirm(vd, prompt, exc=EscapeException): 'Display *prompt* on status line and demand input that starts with "Y" or "y" to proceed. Raise *exc* otherwise. Return True.' - if vd.options.batch and not vd.options.interactive: + if vd.options.batch: return vd.fail('cannot confirm in batch mode: ' + prompt) yn = vd.input(prompt, value='no', record=False)[:1] diff --git a/visidata/form.py b/visidata/form.py index 2e019548f..16bc10b84 100644 --- a/visidata/form.py +++ b/visidata/form.py @@ -103,7 +103,7 @@ def run(self, scr): @VisiData.api def confirm(vd, prompt, exc=EscapeException): 'Display *prompt* on status line and demand input that starts with "Y" or "y" to proceed. Raise *exc* otherwise. Return True.' - if vd.options.batch and not vd.options.interactive: + if vd.options.batch: return vd.fail('cannot confirm in batch mode: ' + prompt) form = FormSheet('confirm', rows=[ diff --git a/visidata/main.py b/visidata/main.py index c3db16c60..19e003321 100755 --- a/visidata/main.py +++ b/visidata/main.py @@ -359,6 +359,7 @@ def main_vd(): return 1 if vd.options.interactive: + vd.options.batch = False #2639 vd.execAsync = lambda *args, vd=vd, **kwargs: visidata.VisiData.execAsync(vd, *args, **kwargs) run() else: