SchoofsKelvin / vscode-sshfs

Extension for Visual Studio Code: File system provider using SSH
GNU General Public License v3.0
543 stars 36 forks source link

remote shell ... seems to not interpret or display keyboard input correctly #310

Closed dulhaver closed 2 years ago

dulhaver commented 2 years ago

I am using VSCodium on a Windows7 Enterprise Laptop which has git bash running (whether that is even relevant) and connect to remote rhel VM's with vscode-sshfs.

I face very strange behavior of the shell in various sshfs sessions. Here is an example which illustrates the matter:

/opt/db/data/postgres> grep wal data/postgresql.conf
-bash: gre: command not found
/opt/db/data/postgres> grep wal data/postgresql.conf
-bash: grpewwla: command not found

so the input 'grep wal' is interpreted as 'gre' or 'grpewwla' in this example. Same behaviour occurs every now and then in any remote shell session.

So either the input is not displayed correctly, oder the correct displaid input is not interpreted correctly. Both options are quite annoying.

Also the use of up arrow key (in order to toogle through recent commands) often results into display of nonsense

dulhaver commented 2 years ago

some more examples:

user@vm_name:~/my_repo> git checkout dev-agrarantrag-k8s step/roles/prepare_step_server/tasks/main.yml
git: 'checkoudev-agrarantrag-k8s' is not a git command. See 'git --help'.
user@vm_name:~/my_repo> git checkout dev-agrarantrag-k8s step/roles/prepare_step_server/tasks/main.yml
git: 'chect' is not a git command. See 'git --help'.

The most similar command is
        checkout
user@vm_name:~/my_repo> git checkout dev-agrarantrag-k8sstep/roles/prepare_step_server/tasks/main.yml
error: pathspec 'dev-agrarantrag-k8sstep/roles/prepare_step_server/tasks/main.yml' did not match any file(s) known to git
user@vm_name:~/my_repo> git checkout dev-agrarantrag-k8s ./path/to/main.yml
error: pathspec 'dev-agrarantrag-' did not match any file(s) known to git
user@vm_name:~/my_repo> git checkout dev-agrarantrag-k8s ./path/to/main.yml
error: pathspec 'dev-agrarantrak8sg-' did not match any file(s) known to git
user@vm_name:~/my_repo> git checkout dev-agrarantrak8sg- ./path/to/main.yml
SchoofsKelvin commented 2 years ago

Does this issue also happen when running ssh ... in the integrated terminal? This looks like an issue with VS Code's terminal input prediction feature they added a few months back if my memory serves me right.

dulhaver commented 2 years ago

Does this issue also happen when running ssh ... in the integrated terminal?

I'll check on that in the coming days and report back

dulhaver commented 2 years ago

Does this issue also happen when running ssh ... in the integrated terminal?

seems it does:

user@vm-0128:~/repos> git clone --all http://remote.net/organisation/repo.git
git: 'ne' is not a git command. See 'git --help'.

The most similar commands are
        clone
        notes
        prune

when I use the up arow key afterwards I get: user@vm-0128:~/repos> git cne --all in http://remote.net/organisation/repo.git, so it looks like it is a display problem rather then misinterpretation

SchoofsKelvin commented 2 years ago

I'd say check VS Code issues page to see if there's an existing issue for this, otherwise make one. Parsing/rendering the output (including terminal sequences) is done by VS Code (using the Xterm.js package).