Seg fault when using "HISTFILE=~/.zsh_history" #119

Closed
frdmn opened this Issue Feb 16, 2016 · 3 comments

2 participants

@frdmn

Hello,

as soon as I put HISTFILE=~/.zsh_history in my .zshrc, zsh seems to seg fault when zsh-autosuggestions in combination with zsh-history-substring-search and zsh-syntax-highlighting is enabled.

It works quite when I comment out this one line.

Here's a .zshrc to reproduce the issue:

HISTFILE=~/.zsh_history

# Load zsh-syntax-highlighting plugin
. ${HOME}/.zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

# Load zsh-history-substring-search
. ${HOME}/.zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh

# Load zsh-autosuggestions plugin
. ${HOME}/.zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh

## zsh-autosuggestions
# use ctrl+T to toggle autosuggestions
bindkey '^T' autosuggest-toggle

## zsh-history-substring-search
# bind UP and DOWN arrow keys
zmodload zsh/terminfo
bindkey "$terminfo[kcuu1]" history-substring-search-up
bindkey "$terminfo[kcud1]" history-substring-search-down
# bind P and N for EMACS mode
bindkey -M emacs '^P' history-substring-search-up
bindkey -M emacs '^N' history-substring-search-down
# bind k and j for VI mode
bindkey -M vicmd 'k' history-substring-search-up
bindkey -M vicmd 'j' history-substring-search-down
# OS X support
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down

I am not quite sure what's the specific problem. Anyone care to help me troubleshoot this?

I'm using the latest version (freshly cloned from this repository), by the way.

Let me know if you need any more information.

@frdmn

Noticed another strange thing. When you run a command and it's exit status is >0. Now hit Arrow Up when the cursor is at the beginning of the prompt:

~  false~  [PRESS ARROW UP]
❯  ~  zsh: segmentation fault  zsh -x
@ericfreese
zsh-users member

Can you confirm you're using the most recent version of the plugin?

❯ git -C "${HOME}/.zsh/plugins/zsh-autosuggestions" rev-parse --short HEAD
45ab49d
@frdmn

@ericfreese Damn, I should have checked that by myself:

❯ git -C .zsh/plugins/zsh-autosuggestions rev-parse --short HEAD
76f415b

So, I was on version 0.2.5 and not 0.2.7. Thanks a lot, Eric! :)

@frdmn frdmn closed this Feb 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment