Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
519f1c3bae | ||
|
|
d8f8101d9e |
+6
-2
@@ -166,7 +166,7 @@ const tuiMenu = async () => {
|
|||||||
records += ` | ${host.user} | ${host.port}`;
|
records += ` | ${host.user} | ${host.port}`;
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
return await $`echo "${records}" | fzf -e --layout=reverse --with-nth=2,3,4,5,6 --accept-nth=1 --delimiter="|"`.text();
|
return await $`echo "${records}" | column -t -s "|" -o "|" | fzf -e --layout=reverse --with-nth=2,3,4,5,6 --accept-nth=1 --delimiter="|"`.text();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
@@ -186,4 +186,8 @@ const hostIndex = Number(await tuiMenu());
|
|||||||
const cmd = buildSSHCommnand(config.hosts[hostIndex]);
|
const cmd = buildSSHCommnand(config.hosts[hostIndex]);
|
||||||
console.log(cmd.join(" "));
|
console.log(cmd.join(" "));
|
||||||
|
|
||||||
await $`${cmd}`;
|
try {
|
||||||
|
await $`${cmd}`;
|
||||||
|
} catch (error) {
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user