vscode-nushell-lang icon indicating copy to clipboard operation
vscode-nushell-lang copied to clipboard

`<command> <subcommand>` is inserted even when `<command>` is already typed

Open EmilyGraceSeville7cf opened this issue 2 years ago • 8 comments

  • Type into<space>
  • Press Ctrl+Space
  • Chose into int (or any other subcommand)
  • Get into into int, instead of into int

What can be done:

  • <command> should not be inserted when it's already written
  • <command> should not be shown in intellisence suggestion when it's already typed

Nu:

0.79.0

VS Code:

Version: 1.77.3
Commit: 704ed70d4fd1c6bd6342c436f1ede30d1cff4710
Date: 2023-04-12T09:16:52.732Z
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: 10.2.154.26-electron.0
OS: Linux x64 5.15.0-71-generic
Sandboxed: No

OS:

Linux 22.04 Ubuntu

EmilyGraceSeville7cf avatar May 01 '23 10:05 EmilyGraceSeville7cf

ya, i think this is a bug. we may have to change nushell's complete functionality, or manipulate it's return on the typescript side.

fdncred avatar May 01 '23 12:05 fdncred

I can't reproduce this on Windows. That seems weird.

complete

fdncred avatar May 01 '23 15:05 fdncred

I use Ubuntu 22.04 LTS (MATE desktop environment).

EmilyGraceSeville7cf avatar May 01 '23 15:05 EmilyGraceSeville7cf

I uploaded a gif, does it look like i'm doing what you described?

fdncred avatar May 01 '23 15:05 fdncred

To reproduce issue you should trigger autocomplete for into <something> when into<space> is written on the same line.

EmilyGraceSeville7cf avatar May 01 '23 18:05 EmilyGraceSeville7cf

I see what you mean. If you let the auto-completer launch itself, you get proper completions. If you ignore that prompt and ctrl+space yourself, you get into into completions.

I tested like this 'str' | int<auto_magic_complete> and it works fine but 'str | into <ctrl+space> I get into into whatever I chose. In the second form, where the problem is, i have to cancel the auto_magic_complete popup in order to make it fail.

fdncred avatar May 02 '23 19:05 fdncred

auto_magic_complete - where this setting can be found?

EmilyGraceSeville7cf avatar May 02 '23 20:05 EmilyGraceSeville7cf

auto_magic_complete - where this setting can be found?

LOL. I just mean that when i typed int, before i could get to the o in into, the completions pop up without me triggering them.

fdncred avatar May 02 '23 22:05 fdncred