syntax revamp

This commit is contained in:
2026-05-24 12:32:57 -07:00
parent 6c0a1b4415
commit 5041d9fbb9
20 changed files with 1512 additions and 1060 deletions
+5 -9
View File
@@ -2089,7 +2089,7 @@ class PipelineExecutor:
# Command expansion via @N:
# - Default behavior: expand ONLY for single-row selections.
# - Special case: allow multi-row expansion for add-file directory tables by
# combining selected rows into a single `-path file1,file2,...` argument.
# combining selected rows into one comma-separated positional source token.
if source_cmd and not skip_pipe_expansion and not prefer_row_action:
src = str(source_cmd).replace("_", "-").strip().lower()
@@ -2107,19 +2107,15 @@ class PipelineExecutor:
[str(x) for x in row_args if x is not None]
)
# Combine `['-path', <file>]` from each row into one `-path` arg.
# Combine `[<file>]` from each row into one positional source token.
paths: List[str] = []
can_merge = bool(row_args_list) and (
len(row_args_list) == len(selection_indices)
)
if can_merge:
for ra in row_args_list:
if len(ra) == 2 and str(ra[0]).strip().lower() in {
"-path",
"--path",
"-p",
}:
p = str(ra[1]).strip()
if len(ra) == 1:
p = str(ra[0]).strip()
if p:
paths.append(p)
else:
@@ -2127,7 +2123,7 @@ class PipelineExecutor:
break
if can_merge and paths:
selected_row_args.extend(["-path", ",".join(paths)])
selected_row_args.append(",".join(paths))
elif len(selection_indices) == 1 and row_args_list:
selected_row_args.extend(row_args_list[0])
else: