Skip to content

allow specification of port/x11port via variable (as numeric string) #265

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
GitMensch opened this issue Apr 28, 2021 · 1 comment
Closed
Assignees

Comments

@GitMensch
Copy link
Collaborator

vscode replaces different variables which is quite handy. with "self-defined unknown" settings this also allows project-wide configuration via code-workspace or user-configuration in all projects.

"settings": {
   "project.name": "P1",
   "project.server": "p1server",
}

which can then be used also in different other places like the ssh settings:

   "ssh.host": "${config:project.server}"

ssh.x11port is a number that trick does not work there.

Is it possible to specify that via another (string) variable already? If not: please consider that "untyped" variant as an additional setting (if set use it, otherwise use ssh.x11port).

@GitMensch GitMensch changed the title allow specification if x11port from configuration allow specification of x11port via variable Apr 28, 2021
@GitMensch GitMensch self-assigned this Mar 4, 2022
@GitMensch
Copy link
Collaborator Author

That's actually quite easy, we only need to allow strings, the conversion is done "in the background", and specifying a non-numeric string is checked on the ssh2 side:

Failed to SSH: RangeError [ERR_SOCKET_BAD_PORT]: Port should be >= 0 and < 65536. Received banana.

(not tested for x11port, will need to be done later)

@GitMensch GitMensch changed the title allow specification of x11port via variable allow specification of port/x11port via variable (as numeric string) Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant