nushell / nushell

A new type of shell
https://www.nushell.sh/
MIT License
31.88k stars 1.64k forks source link

Better TAB Completion #12296

Open VehementHam opened 6 months ago

VehementHam commented 6 months ago

Related problem

When using TAB completion on a file that contains [], `` are put on the outside of the file. The shell returns an error, because they [] are special characters.

If I use '', and then preform the TAB completion, it is changed to ``.

If I begin to type the location of a file, for example Artists/The Goo Goo Dolls, and I start with a `, after using TAB completion on Artists/, the ` is removed, and I have to move the cursor back, and re-add the ``

Describe the solution you'd like

When a ' is used, and TAB completion is preformed, leave the ' there.

Don't screw with what the user has typed as much.

Describe alternatives you've considered

No response

Additional context and details

No response

fdncred commented 6 months ago

one purpose of backtick quotes is specifically to escape paths and filenames with spaces and they happen automatically for me.

VehementHam commented 6 months ago

They do not escape everything. The tab completion needs to be like ZSH. At least there should be a plugin or config option to set it like ZSH.

fdncred commented 6 months ago

I said filename with strings above and what i mean was filenames with spaces. I corrected it.

Thanks for your opinion. You should feel free to work on a PR to reedline and/or nushell to make completions better.