Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tab completion #6

Closed
lenw opened this issue Nov 1, 2017 · 5 comments
Closed

Tab completion #6

lenw opened this issue Nov 1, 2017 · 5 comments
Labels

Comments

@lenw
Copy link

lenw commented Nov 1, 2017

Having intelligent tab completion would be great 🥇

@dundalek
Copy link
Owner

dundalek commented Nov 2, 2017

Definitely on the list.

@yubrshen
Copy link

yubrshen commented Nov 2, 2017

To me, tab completion is the top priority. Without it, it's really hard to use.

@dundalek
Copy link
Owner

dundalek commented Nov 3, 2017

Here is a overview how to approach this:

1) Tab-based autocompletions

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

2) Fish-like auto-suggestions as you type

Once we have autocompletions we can improve the experience by implementing fish-like auto-suggestions as you type.

From fish-shell/fish-shell#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.

3) Autocompletion menu

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.

Parsing manual pages

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.

@dundalek
Copy link
Owner

dundalek commented Nov 3, 2017

Another cool enhancement would be to offer suggestions from tldr.

@dundalek dundalek mentioned this issue Nov 30, 2017
@dundalek
Copy link
Owner

Closing this as the initial tab completion has been implemented. Further improvements are tracked in: #40

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants