From b8d1689e0c0a47f461009dcc0411db7deb5981dd Mon Sep 17 00:00:00 2001 From: midichef <67946319+midichef@users.noreply.github.com> Date: Mon, 18 Mar 2024 19:34:02 -0700 Subject: [PATCH] [main-] apply +:col:row arg to all sheets --- visidata/main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/visidata/main.py b/visidata/main.py index 733e92a0c..28286dc8f 100755 --- a/visidata/main.py +++ b/visidata/main.py @@ -96,13 +96,16 @@ def parsePos(vd, arg:str, inputs:'list[tuple[str, dict]]'=None): pos = arg.split(':') if len(pos) == 1: + startsheets = [Path(inputs[-1][0]).base_stem] if inputs else None startrow = arg elif len(pos) == 2: + startsheets = [Path(inputs[-1][0]).base_stem] if inputs else None startcol, startrow = pos else: # the first element of pos is the startsheet, # the later elements (if present) describe the branch to a subsheet startsheets = pos[:-2] + if startsheets == ['']: startsheets = [] startcol, startrow = pos[-2:] if startcol == '': startcol = None if startrow == '': startrow = None