Description
Related problem
I mentioned this in here #11828 before, I temporarily solved with Carapace, but still, Nushell could do better in a more general way instead.
Describe the solution you'd like
I would like to see Nushell have a built-in autocomplete solution that works for anything and everything, rather than depending on specific custom type for each tool.
Here is a reference to the idea. https://github.com/marlonrichert/zsh-autocomplete/
Nushell could build something better, as it does for many different things. Possibly be adaptable for different new things if required.
More references:
https://github.com/zsh-users/zsh-autosuggestions
https://github.com/microsoft/inshellisense
https://github.com/lasantosr/intelli-shell/
https://github.com/esdmr/fish-completion
I suppose there are ways to get information like --help
, -h
or man
.
I have found this that could also be useful https://explainshell.com/ In how they reach what they do.
https://github.com/idank/explainshell
https://github.com/idank/bashlex
https://github.com/rsteube/carapace-shlex
Maybe AI could be something, if they were aware of updated documentations and If they were given the right contexts as auto complete only.
https://github.com/BuilderIO/ai-shell
I suppose they would need to be pre-trained on documentation from all OS tools and external that works in command line.
What you see out there are all alike where you describe what you want and it returns a command for you, like warp, rather than being auto-completion aware and offering good possible completions, be what it may. I guess that would be a step up from smart history completion. But the effort wold probably not make sense, and specific completions would still be the only choice.
Additionally, smart history usage, like you see in
https://github.com/atuinsh/atuin or https://github.com/cantino/mcfly
What I added are just references, not the actual request itself, do what is possible. They are meant to help build a better idea on the feature.
Though, if possible, be smarter than any other autosuggest, autocomplete, intellisense, aware tools or at least code considering these things in the foundation of it to make easy to implement them after.
There are more useful ideas / informations in the comments below.