-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
[Feat]: allow code
cli to read from stdin as the vscode one
#5693
Comments
Ah I think the name is |
Interesting. So, why there are two CLIs then? |
I am not sure actually...I did not think we included any scripts
called `code`. What do you get for `which code`?
|
Ops, actually it's just a symlink to code-server: ln -s /usr/local/lib/code-server/bin/code-server /usr/local/bin/code This is done by the image I'm using. And, that's very weird, see: ❯ echo hi | code-server -
Reading from stdin via: /tmp/code-stdin-U2j
^C
❯ echo hi | code -
[2023-02-28T00:10:43.853Z] error Unknown option -
#!/bin/sh
exec code-server "${@}" And now it works. |
Maybe there is something wrong with the |
Ahhhhh I see, so there is the main script which launches the main
code-server process and manages VS Code (this one is written by
us):
```
/usr/local/lib/code-server/bin/code-server
```
And then there is the internal code-server script used in the
integrated terminal (this one is written by Microsoft):
```
/usr/local/lib/code-server/lib/vscode/bin/remote-cli/code-server
```
The two scripts overlap in some ways but have some differences
unfortunately. I think there is an issue somewhere to delegate to
Microsoft's script rather than try re-implementing everything since
we miss things like this.
|
Here it is: #5414, |
What is your suggestion?
The
code
cli which comes with the VS Code's own server implementation (like Remote - WSL or Remote - Containers) allows the following:Code_H4dwcVrXAz.mp4
code-server's code cli fails with:
Why do you want this feature?
It's very useful so I can use the editor to analyze output of long-running commands like
docker logs -f
.Are there any workarounds to get this functionality today?
I tried but I did not find any.
Are you interested in submitting a PR for this?
No plans.
The text was updated successfully, but these errors were encountered: