Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在连接到远程ssh时启用vs terminal git命令自动完成?_Git_Ssh_Visual Studio Code_Vscode Remote - Fatal编程技术网

如何在连接到远程ssh时启用vs terminal git命令自动完成?

如何在连接到远程ssh时启用vs terminal git命令自动完成?,git,ssh,visual-studio-code,vscode-remote,Git,Ssh,Visual Studio Code,Vscode Remote,当连接到远程ssh时,我无法在vs代码集成终端上自动完成git命令 当我在外部使用终端时,Autocomplete工作 有什么可以帮我的吗?首先检查远程服务器rc文件上激活bahs完成的位置。 检查您看到的位置(在远程服务器帐户目录上): 是在: ~remoteAccount/.bashrc ~remoteAccount/.bashrc\u配置文件 ~remoteAccount/.profile 似乎仅表明。bashrc是源代码 在您的情况下,一旦远程SSH会话在VSCode中打开,请尝试手

当连接到远程ssh时,我无法在vs代码集成终端上自动完成git命令

当我在外部使用终端时,Autocomplete工作


有什么可以帮我的吗?

首先检查远程服务器rc文件上激活bahs完成的位置。
检查您看到的位置(在远程服务器帐户目录上):

是在:

  • ~remoteAccount/.bashrc
  • ~remoteAccount/.bashrc\u配置文件
  • ~remoteAccount/.profile
似乎仅表明
。bashrc
是源代码


在您的情况下,一旦远程SSH会话在VSCode中打开,请尝试手动获取声明了
bash_completion.sh
的文件。

Nn我的远程服务器,我试图找到该文件,但没有任何运气。另外
/usr/local/etc
文件夹似乎是空的。@SiddhantNaik可能是远程服务器上没有安装git,这意味着没有要激活的bash完成(如中所述)。我找到了bash_完成文件,也安装了git。但是要修改这个文件,我需要根访问权限,而我没有。所以我会联系管理员做这件事。谢谢你的帮助。干杯
[[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]] && . "/usr/local/etc/profile.d/bash_completion.sh"