0.2.5 causes history-substring-search-up to crash the zsh session, even when setting the options recommended by README #115

Closed
ronjouch opened this Issue Feb 14, 2016 · 7 comments

3 participants

@ronjouch

Reproduction scenario:

  • Oh-my-zsh with only plugins=(zsh-autosuggestions) and
ZSH_AUTOSUGGEST_CLEAR_WIDGETS=("${(@)ZSH_AUTOSUGGEST_CLEAR_WIDGETS:#(up|down)-line-or-history}")
ZSH_AUTOSUGGEST_CLEAR_WIDGETS+=(history-substring-search-up history-substring-search-down)
  • In an empty line, press Up

Expected: show my last-used command (vanilla bash/zsh behavior). history-substring-search should be triggered only on non-empty lines.

Actual: No such widget 'history-substring-search-up', and the last-used command is not displayed.

I think this started to happened at 0.2.3 or 0.2.5.

@ericfreese
zsh-users member

Are you sourcing the zsh-history-substring-search.zsh file somewhere to define the history-substring-search-up and history-substring-search-down widgets?

@ronjouch

@ericfreese hmkay, so this is a funny one. Please ignore the title: as you're saying (and as I'm describing when I say I'm only loading plugins=(zsh-autosuggestions)), the reproduction scenario I'm describing as an attempt to narrow down on the issue is completely borked.

Here's my initial, real problem with 0.2.something:

  • On an empty line,
  • Press up

→ Zsh exits silently.

Am trying to precise the issue.

@ronjouch ronjouch changed the title from 0.2.x causes history-substring-search-up to be triggered even on empty line to 0.2.x causes history-substring-search-up to crash the zsh session, even when setting the options recommended by README Feb 15, 2016
@ronjouch

@ericfreese so I think I'm hitting the infinite recursion problem described in README ending up a crash. But I am setting the options you recommend (just like I have been for months!). Below is a minimal reproduction .zshrc. I tried fiddling with plugins and variables order, that didn't help. What am I doing wrong?

ZSH=$HOME/.oh-my-zsh
plugins=(zsh-autosuggestions history-substring-search)
source $ZSH/oh-my-zsh.sh
# setting those below don't help:
ZSH_AUTOSUGGEST_CLEAR_WIDGETS=("${(@)ZSH_AUTOSUGGEST_CLEAR_WIDGETS:#(up|down)-line-or-history}")
ZSH_AUTOSUGGEST_CLEAR_WIDGETS+=(history-substring-search-up history-substring-search-down)
@ronjouch ronjouch changed the title from 0.2.x causes history-substring-search-up to crash the zsh session, even when setting the options recommended by README to 0.2.5 causes history-substring-search-up to crash the zsh session, even when setting the options recommended by README Feb 15, 2016
@ronjouch

@ericfreese trying successive versions, I confirm that v0.2.5 is the first version with the problem.

@ipod825

I also have problems with version 0.2.5

Here's minimum zshrc to reproduce the error

##ANTIGEN                                                                                                                             
GEN_HOME=$HOME/.antigen                                            
if ! [[ -d $GEN_HOME ]]                                            
then                                                               
git clone https://github.com/zsh-users/antigen.git $GEN_HOME       
fi                                                                 
source "$GEN_HOME/antigen.zsh"                                     
antigen bundle tarruda/zsh-autosuggestions                         
antigen bundle zsh-users/zsh-history-substring-search              

HISTFILE=~/.zsh_history                                            
zmodload zsh/terminfo                                              
bindkey "$terminfo[kcuu1]" history-substring-search-up             
bindkey "$terminfo[kcud1]" history-substring-search-down           
bindkey '^[[A' history-substring-search-up                         
bindkey '^[[B' history-substring-search-down                       

ZSH_AUTOSUGGEST_CLEAR_WIDGETS=("${(@)ZSH_AUTOSUGGEST_CLEAR_WIDGETS:#(up|down)-line-or-history}")                                      
ZSH_AUTOSUGGEST_CLEAR_WIDGETS+=(_history-substring-search-begin history-substring-search-up history-substring-search-down ) 

Pressing up key on empty lines result in Error _history-substring-search-begin:30: job table full or recursion limit exceeded

@ericfreese
zsh-users member

I've just pushed v0.2.6, which I believe fixes all infinite recursion issues. Please give that a shot.

Edit: v0.2.6 had a typo. Try v0.2.7

@ericfreese ericfreese closed this Feb 15, 2016
@ipod825

Yeah, the problem is solved. Thanks a lot.

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