@xynogen/pix-ssh 0.2.5 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.ts +4 -2
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -41,6 +41,7 @@ import {
|
|
|
41
41
|
renderCollapsedToolRow,
|
|
42
42
|
renderToolError,
|
|
43
43
|
ruleFrame,
|
|
44
|
+
sectionRule,
|
|
44
45
|
termW,
|
|
45
46
|
} from "@xynogen/pix-pretty/utils";
|
|
46
47
|
import { getUnattendedMode, withAgentBlock } from "@xynogen/pix-runtime";
|
|
@@ -536,7 +537,7 @@ export default function (pi: ExtensionAPI): void {
|
|
|
536
537
|
const prefix = args.sudo ? "sudo " : "";
|
|
537
538
|
text.setText(
|
|
538
539
|
fillToolBackground(
|
|
539
|
-
`${theme.fg("toolTitle", theme.bold("ssh"))} ${theme.fg("dim", host)} ${theme.fg("
|
|
540
|
+
`${theme.fg("toolTitle", theme.bold("ssh"))} ${theme.fg("dim", host)} ${theme.fg("muted", prefix + command)}`,
|
|
540
541
|
),
|
|
541
542
|
);
|
|
542
543
|
return text;
|
|
@@ -624,8 +625,9 @@ export default function (pi: ExtensionAPI): void {
|
|
|
624
625
|
lineCount > maxShow ? [`${FG_DIM} … ${lineCount - maxShow} more lines${RST}`] : [];
|
|
625
626
|
const statusKey = code === null ? "dim" : code === 0 ? "success" : "error";
|
|
626
627
|
const paint = (s: string) => theme.fg(statusKey, s);
|
|
628
|
+
const sw = Math.max(8, termW() - 4); // section-rule width inside the 2-space indent
|
|
627
629
|
const out = ruleFrame(
|
|
628
|
-
show.map((line) => ` ${line}`),
|
|
630
|
+
show.map((line) => ` ${sectionRule(line, theme, sw) ?? line}`),
|
|
629
631
|
footer,
|
|
630
632
|
termW(),
|
|
631
633
|
paint,
|