feat: ssh.ts

This commit is contained in:
2026-01-11 14:02:51 +08:00
parent d66827de86
commit c9c1911085

View File

@@ -62,6 +62,9 @@ function printSshConfig(sshConfig: SshConfig) {
for (let i = 0; i < allProfiles.length; i++) {
const k = allProfiles[i];
const sshProfile = sshConfig.profiles[k];
const features = [];
if (sshProfile.proxy) features.push("proxy");
if (sshProfile.forward_agent) features.push("forward_agent");
console.log(
` - ${k}${
" ".repeat(maxProfileNameLength - k.length)
@@ -73,7 +76,9 @@ function printSshConfig(sshConfig: SshConfig) {
: "aliases"
}: [${
(sshProfile.alias && sshProfile.alias.join(", ")) || ""
}]${RESET} # ${sshProfile.comment}`,
}]${RESET} # ${sshProfile.comment}${
(features.length > 0) ? (" ;[" + features.join(" ") + "]") : ""
}`,
);
}
}