fix ssh url handling
This commit is contained in:
parent
32447ade1b
commit
32eeb6d0cf
6 changed files with 8 additions and 12 deletions
|
|
@ -292,12 +292,11 @@ export function leaveFullScreen(): HyperActions {
|
|||
};
|
||||
}
|
||||
|
||||
export function openSSH(url: string) {
|
||||
export function openSSH(parsedUrl: ReturnType<typeof parseUrl>) {
|
||||
return (dispatch: HyperDispatch) => {
|
||||
dispatch({
|
||||
type: UI_OPEN_SSH_URL,
|
||||
effect() {
|
||||
const parsedUrl = parseUrl(url, true);
|
||||
let command = `${parsedUrl.protocol} ${parsedUrl.user ? `${parsedUrl.user}@` : ''}${parsedUrl.resource}`;
|
||||
|
||||
if (parsedUrl.port) command += ` -p ${parsedUrl.port}`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue