Autosuggestion crashes terminal window #84

Closed
hoodsy opened this Issue Jan 1, 2016 · 2 comments

4 participants

@hoodsy

Frequently, using the right arrow to accept a suggestion will close my terminal window, regardless of whether AUTOSUGGESTION_ACCEPT_RIGHT_ARROW=1 is set. Also, after running a few commands, the up-arrow history is inaccessible:

_zsh_highlight_call_widget: maximum nested function level reached
❯

~
❯
autosuggest-pause:1: maximum nested function level reached

Removing autosuggestion removes these issues:

source ~/.zsh/zsh-autosuggestions/autosuggestions.zsh

AUTOSUGGESTION_ACCEPT_RIGHT_ARROW=1
AUTOSUGGESTION_HIGHLIGHT_COLOR="fg=5"

zle-line-init() {
    zle autosuggest-start
}
zle -N zle-line-init

I'm not sure the root of this issue, but it makes using this plugin essentially impossible.

@ericfreese
zsh-users member

Looks like this is caused by sourcing ~/.zshrc twice.

$ zsh --version
zsh 5.2 (x86_64-apple-darwin14.5.0)
$ zsh                           # Start zsh from bash
% source ~/.zshrc               # Re-source ~/.zshrc
% sourceSegmentation fault: 11  # Type "source" and press right arrow key

Edit: After playing a bit more, it looks like it's the reloading of autosuggestions.zsh that does it.

@faceleg faceleg closed this Jan 20, 2016
@ahmgeek

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment