Closed lenw closed 6 years ago
Definitely on the list.
To me, tab completion is the top priority. Without it, it's really hard to use.
Here is a overview how to approach this:
First step and quickest way to get to autocompletions is to integrate existing defitions from fish, zsh, bash. I've already done some experiments on that: https://github.com/dundalek/commandray/tree/master/vendor
Once we have autocompletions we can improve the experience by implementing fish-like auto-suggestions as you type.
From https://github.com/fish-shell/fish-shell/issues/3567 :
Keep in mind that fish has two distinct mechanisms: auto-suggestions and completions. The former is based on you command history. The latter on a combination of auto-generated or hand crafted completion commands plus auto-generated pathnames.
For inspiration this is a plugin for auto-suggestions for zsh.
Next step is to show visual menu where multiple suggestion can be displayed and user can navigate to choose. I like the visual style of autocomplete as seen in gitsome.
As a bonus for the future we can try to parse manual pages to enable autocompletion for unknown or custom commands. I've opened a separate issue for that.
Closing this as the initial tab completion has been implemented. Further improvements are tracked in: https://github.com/dundalek/closh/issues/40
Having intelligent tab completion would be great 🥇