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