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

new Fish-style instant autosuggestions #17

Closed
sunaku opened this issue Jan 22, 2013 · 18 comments
Closed

new Fish-style instant autosuggestions #17

sunaku opened this issue Jan 22, 2013 · 18 comments

Comments

@sunaku
Copy link
Member

sunaku commented Jan 22, 2013

The fish shell has developed a new, more powerful "autosuggestions" history search:

Fish autosuggestions

Can this be ported to ZSH? If so, let's start a new zsh-history-autosuggest script.

/cc @guidovansteen @sorin-ionescu @nicoulaj

@nicoulaj
Copy link
Member

Do you know about auto-fu.zsh ? It seems to be close to this, but uses completion system instead of history.

@guidovansteen
Copy link
Member

@sunaku: I do not think this would be of much interest to me. I am not a fan of suggestions I have not asked for. When I suspect the long command is somewhere in my history file I just press repeatedly until the relevant command appears.

Good luck with the project though!

@nicoulaj: I am afraid the completion system works quite different from our history search.

@sunaku
Copy link
Member Author

sunaku commented Jan 24, 2013

Thanks for the feedback guys.

@sunaku sunaku closed this as completed Jan 24, 2013
@sorin-ionescu
Copy link
Member

I like the new Fish auto suggestions.

@joe9
Copy link
Contributor

joe9 commented Apr 3, 2013

Check out predict-on zsh plugin.

@guidovansteen
Copy link
Member

Thanks for this notification!

Guido van Steen

On Wed, Apr 3, 2013 at 4:33 PM, joe9 notifications@github.com wrote:

Check out predict-on zsh plugin.


Reply to this email directly or view it on GitHubhttps://github.com//issues/17#issuecomment-15840110
.

@sunaku
Copy link
Member Author

sunaku commented Apr 4, 2013

@joe9 thanks, that's pretty cool. ✨ Now, if only I could configure predict-on to: 🐣

  • perform a substring search (match anywhere, not just at beginning of command line)
  • be toggleable by pressing Ctrl-Z (maybe it could set a $ZSH_PREDICT_ON flag) found an answer
  • show a list of all matching commands (like a normal ZSH completion menu)

@sorin-ionescu
Copy link
Member

@nicoulaj, auto-fu conflicts with zsh-syntax-highlighting and zsh-history-substring-search.

@sorin-ionescu
Copy link
Member

Neither zsh-syntax-highlighting nor zsh-history-substring-search play well with predict-on. The former does not highlight and the latter searches for the entire line — both the typed portion and the prediction. Fish only searches for the typed portion of the line.

Use the following to enable predict-on.

autoload -U predict-on
zle -N predict-on
zle -N predict-off
bindkey '^X^Z' predict-on
bindkey '^X^A' predict-off
zstyle ':predict' verbose 'yes'

The key bindings are arbitrary. Better ones ought to be found.

@sunaku
Copy link
Member Author

sunaku commented Oct 31, 2013

@tarruda has ported Fish's autosuggestions to ZSH ✨ in https://github.com/tarruda/zsh-autosuggestions

@tarruda
Copy link

tarruda commented Oct 31, 2013

While the basic autosuggestion infrastructure is in place, the widget is very alpha. It would be great if a zle expert could send some patches

@sunaku sunaku reopened this Nov 2, 2013
@tarruda
Copy link

tarruda commented Nov 8, 2013

zsh-autosuggestions should be more stable now. I also added some tweaks to make it play nicely with zsh-syntax-highlighting

@nicoulaj
Copy link
Member

nicoulaj commented Nov 8, 2013

@tarruda your project is pretty cool, please get in touch if you want to host it in the zsh-users organization

@tarruda
Copy link

tarruda commented Nov 9, 2013

@nicoulaj sounds good, what do I have to do?

@nicoulaj
Copy link
Member

nicoulaj commented Dec 1, 2013

@tarruda sorry for the delay, I forgot about this. I gave you the rights on the organization, so you can now transfer or create repositories in the organization. The only rules are:

  • All projects must be related to zsh ;)
  • All projects must be general purpose (no dotfiles or personal stuff like that)
  • If you go the organization settings page, then "teams" you can see we use teams for dealing with access rights

Welcome!

@sorin-ionescu
Copy link
Member

@nicoulaj, should Prezto be part of @zsh-users or should I keep it under my name? Do you consider it general enough?

@nicoulaj
Copy link
Member

nicoulaj commented Dec 2, 2013

Yes, of course it fits in this organization. I gave you the rights too.

Also, please note I'm not forcing anyone, I created this organization so that pet projects like this can be grouped together and have more visibility, People are free to come and go. So far it seems to work quite fine.

@sorin-ionescu
Copy link
Member

Thank you. I'll keep it under my name for now, at least until I can tag it
v1.0.

On Mon, Dec 2, 2013 at 1:58 PM, Julien Nicoulaud
notifications@github.comwrote:

Yes, of course it fits in this organization. I gave you the rights too.

Also, please note I'm not forcing anyone, I created this organization so
that pet projects like this can be grouped together and have more
visibility, People are free to come and go. So far it seems to work quite
fine.


Reply to this email directly or view it on GitHubhttps://github.com//issues/17#issuecomment-29646420
.

@sunaku sunaku closed this as completed Jan 11, 2014
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

6 participants