Skip to content

Commit

Permalink
Shortcut pickConnection for only 1 connection
Browse files Browse the repository at this point in the history
  • Loading branch information
SchoofsKelvin committed Dec 17, 2020
1 parent b0155c5 commit d66e278
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ui-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,5 +121,6 @@ export async function pickComplex(manager: Manager, options: PickComplexOptions)
}

export const pickConfig = (manager: Manager) => pickComplex(manager, { promptConfigs: true }) as Promise<FileSystemConfig | undefined>;
export const pickConnection = (manager: Manager, name?: string) => pickComplex(manager, { promptConnections: name || true }) as Promise<Connection | undefined>;
export const pickConnection = (manager: Manager, name?: string) =>
pickComplex(manager, { promptConnections: name || true, immediateReturn: !!name }) as Promise<Connection | undefined>;
export const pickTerminal = (manager: Manager) => pickComplex(manager, { promptTerminals: true }) as Promise<SSHPseudoTerminal | undefined>;

0 comments on commit d66e278

Please sign in to comment.