简体   繁体   English

Code-OSS 不会从终端命令“code-oss”打开文件夹或文件。

[英]Code-OSS doesn't open folder or files from terminal command 'code-oss .'

A few days ago I installed Kali Linux. I'm trying to use Code-OSS instead of VSCode, since newest version of Kali doesn't have the libraries needed to install the normal one.几天前我安装了 Kali Linux。我正在尝试使用 Code-OSS 而不是 VSCode,因为最新版本的 Kali 没有安装普通版本所需的库。

If I try to open a folder in Code-OSS from terminal using code-oss.如果我尝试使用code-oss. or code.code. , it just opens Code on a new 'untitled-1' document, or opens the folder I was before closing Code-OSS. ,它只是在新的“untitled-1”文档上打开 Code,或者打开我在关闭 Code-OSS 之前所在的文件夹。 It doesn't open the folder I was in the terminal.它不会打开我在终端中的文件夹。

In these cases I need to open the folder I want through File > Open folder > search for folder and then open it.在这些情况下,我需要通过文件 > 打开文件夹 > 搜索文件夹打开我想要的文件夹,然后打开它。

The same just occurred with git commit or git commit --amend ; git commitgit commit --amend也发生了同样的情况; it opens a new document, not the one I want to open.它会打开一个新文档,而不是我想打开的文档。

I spent sometime searching for a solution on documentation, stackoverflow, google but could not find anything.我花了一些时间在文档、stackoverflow、谷歌上搜索解决方案,但找不到任何东西。

I cannot find any way to resolve this problem on Code-oss.我在 Code-oss 上找不到任何解决此问题的方法。 Apparently it happened just with me.显然它只发生在我身上。

Surprisingly for me, I was able to install VSCode following this tutorial , and it apparently managed to ignore the lack of libraries of Kali Linux that I mentioned above.令我惊讶的是,我能够按照本教程安装 VSCode,而且它显然设法忽略了我上面提到的 Kali Linux 库的缺失。

I hope this solution prevent any person in the future to get stuck on this.我希望这个解决方案可以防止任何人在未来陷入困境。

I had the same issue when I first installed Kali-linux on my VM.当我第一次在我的虚拟机上安装 Kali-linux 时,我遇到了同样的问题。 Pretty anoying.很烦人。

Just intall vscode by running:只需运行以下命令即可安装 vscode:

sudo apt update
sudo apt install code

It will unistall code-oss and install VsCode, and it works now.它将卸载 code-oss 并安装 VsCode,现在可以使用了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM