This commit is contained in:
2026-01-18 10:50:42 -08:00
parent 66132811e0
commit 66e6c6eb72
34 changed files with 718 additions and 516 deletions

View File

@@ -7,7 +7,7 @@ import sys
from cmdlet._shared import Cmdlet, CmdletArg, parse_cmdlet_args
from cmdlet import REGISTRY as CMDLET_REGISTRY, ensure_cmdlet_modules_loaded
from SYS.logger import log
from SYS.result_table import ResultTable
from SYS.result_table import Table
from SYS import pipeline as ctx
@@ -191,7 +191,7 @@ def _render_list(
filter_text: Optional[str],
args: Sequence[str]
) -> None:
table = ResultTable("Help")
table = Table("Help")
table.set_source_command(".help", list(args))
items: List[Dict[str, Any]] = []
@@ -259,11 +259,11 @@ def _render_detail(meta: Dict[str, Any], _args: Sequence[str]) -> None:
args_meta = meta.get("args", []) or []
args_table = ResultTable(title)
args_table = Table(title)
if header_lines:
args_table.set_header_lines(header_lines)
args_table.set_preserve_order(True)
args_table.set_no_choice(True)
args_table._perseverance(True)
args_table._interactive(True)
if not args_meta:
row = args_table.add_row()
@@ -285,8 +285,8 @@ def _render_detail(meta: Dict[str, Any], _args: Sequence[str]) -> None:
desc = f"{desc} ({choice_text})" if desc else choice_text
row.add_column("Description", desc)
example_table = ResultTable(f"{cmd_name} Examples")
example_table.set_preserve_order(True)
example_table = Table(f"{cmd_name} Examples")
example_table._perseverance(True)
example_table.set_header_line("Select @N to insert the example command into the REPL.")
example_items: List[str] = []
@@ -301,7 +301,7 @@ def _render_detail(meta: Dict[str, Any], _args: Sequence[str]) -> None:
if tokens:
example_table.set_row_selection_args(idx, tokens)
else:
example_table.set_no_choice(True)
example_table._interactive(True)
row = example_table.add_row()
row.add_column("Example", "(no examples available)")