Bind right arrow to autocomplete whole line (or single word)? #52

Closed
calebmeyer opened this Issue May 6, 2015 · 6 comments

7 participants

@calebmeyer

I love this plugin, it's making the switch from fish to zsh easier and easier. I was happy to see it now integrates well with the syntax highlighting plugin.

However, it doesn't emulate the default behavior of fish. In fish, if I hit right arrow when a possible completion is shown, it will complete the whole thing at once.

This plugin currently completes a single character when I press the right arrow.

Is there some way to bind right arrow to complete the whole prediction?
Is there some way to bind right arrow to complete by word?

I'm running brew installed zsh 5.0.7 and the latest oh-my-zsh in iTerm2 on Mac OS X 10.10.3 (the latest yosemite) if it makes any difference.

@ababol

See #19

AUTOSUGGESTION_ACCEPT_RIGHT_ARROW=1

@faceleg faceleg closed this May 10, 2015
@joaoponceleao

Hi, I've got that at the top of my zshrc. Is there any reason why it would not work (with zgen in this case)?

@jirutka

It should work, but try to declare it after loading this plugin.

@joaoponceleao

Tried that. No difference. The env variable shows up properly in the terminal though.
Tried removing all options to do with HISTCONTROL, but no change.
Having said that, the up arrow works (using it along with history plugin). So this works just as well.

Also... the following behaviour is strange (may be a separate issue):
1.Type something and autocomplete with: right arrow (char by char) or, tab, or up arrow.
2.- Do not press enter, but instead delete (parts of line or whole line)
3. Autocomplete no longer works for the same specific start of the command (i.e. will work with a completely different input than that of 2).
4. Autocomplete works again after a command is entered.

@faceleg faceleg reopened this Jul 1, 2015
@alem0lars

I'm also having the same problem.
I've added AUTOSUGGESTION_ACCEPT_RIGHT_ARROW=1 but pressing right arrow accepts just a single character.

I'm pretty sure the variable is correctly set because if in a new shell I do echo $AUTOSUGGESTION_ACCEPT_RIGHT_ARROW, the shell outputs 1.

@a-m-s

Likewise, the option has no obvious effect. I'm using vi-mode, if that makes a difference, although the default settings appear to DTRT for vi-mode widgets.

@faceleg faceleg closed this in #74 Nov 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment