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

autosuggestion support #7

Closed
dontdieych opened this issue Feb 27, 2015 · 4 comments
Closed

autosuggestion support #7

dontdieych opened this issue Feb 27, 2015 · 4 comments

Comments

@dontdieych
Copy link

are you plan to support auto suggestion?

@guidovansteen
Copy link
Member

Thanks for your suggestion. I modelled fizsh after fish version 1.23.1. If I remember correctly, this version of fish did not have autosuggestions.

This being said, autosuggestion for zsh is currently provided by https://github.com/tarruda/zsh-autosuggestions. It seems that Tarruda's package works fine with fizsh after loading it at the end of ~/.fizsh/.fizshrc.

I have never thought of packaging zsh-autosuggestions as a part of fizsh, but it could be worth considering. Or at least I could provide some instructions on how to add zsh-autosuggestions in such a way that it works with fizsh.

@guidovansteen
Copy link
Member

The main file of https://github.com/tarruda/zsh-autosuggestions is called "autosuggestions.zsh". In this file the fragment

ZLE_AUTOSUGGEST_COMPLETION_WIDGETS=( complete-word expand-or-complete expand-or-complete-prefix list-choices menu-complete reverse-menu-complete menu-expand-or-complete menu-select accept-and-menu-complete )

yields an error when autocompletion is invoked within fizsh. In fizsh tab is bound to the widget _fizsh-expand-or-complete-and-highlight (and not to expand-or-complete). This is to address zsh-users/zsh-syntax-highlighting#102.

Autocompletion seems to work when the above fragment is changed into:

ZLE_AUTOSUGGEST_COMPLETION_WIDGETS=( complete-word _fizsh-expand-or-complete-and-highlight expand-or-complete-prefix list-choices menu-complete reverse-menu-complete menu-expand-or-complete menu-select accept-and-menu-complete )

@dontdieych
Copy link
Author

Thanks for explanation. I'll give a shot.

Thanks.

@nift4
Copy link

nift4 commented Mar 21, 2020

The main file of https://github.com/tarruda/zsh-autosuggestions is called "autosuggestions.zsh". In this file the fragment

ZLE_AUTOSUGGEST_COMPLETION_WIDGETS=( complete-word expand-or-complete expand-or-complete-prefix list-choices menu-complete reverse-menu-complete menu-expand-or-complete menu-select accept-and-menu-complete )

yields an error when autocompletion is invoked within fizsh. In fizsh tab is bound to the widget _fizsh-expand-or-complete-and-highlight (and not to expand-or-complete). This is to address zsh-users/zsh-syntax-highlighting#102.

Autocompletion seems to work when the above fragment is changed into:

ZLE_AUTOSUGGEST_COMPLETION_WIDGETS=( complete-word _fizsh-expand-or-complete-and-highlight expand-or-complete-prefix list-choices menu-complete reverse-menu-complete menu-expand-or-complete menu-select accept-and-menu-complete )

That is now broken. Could you maybe post an new solution?

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

No branches or pull requests

3 participants