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

history-substring-search doesn't work after update to Ubuntu 12.10 [has workaround] #1433

Closed
seriyps opened this issue Nov 27, 2012 · 79 comments
Labels
Area: plugin Issue or PR related to a plugin Bug Something isn't working Platform: Linux Issue or PR for a Linux system

Comments

@seriyps
Copy link

seriyps commented Nov 27, 2012

history-substring-search just doesn't work since I update my distro from 12.04 to 12.10.
I mean that when I type smth, eg ls and press up-arrow button, it shows me last history item, not started from ls.

My .zshrc

$ cat .zshrc | grep -v -E "^# .*"
ZSH=$HOME/.oh-my-zsh
ZSH_THEME="clean" # fletcherm
plugins=(git history-substring-search command-not-found)
source $ZSH/oh-my-zsh.sh
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

ZSH version

$ zsh --version
zsh 5.0.0 (i686-pc-linux-gnu)
@BRMatt
Copy link

BRMatt commented Dec 1, 2012

I've just done a clean install of ubuntu 12.10 on a new machine and this seems to be happening to me too.

ZSH: zsh 5.0.0 (x86_64-unknown-linux-gnu), OMZ: 22f827e, dotfiles

@ajpaulson
Copy link

Debian Wheezy - same issue - all I did was update oh-my-zsh today (and the issue is present on a server I have running Squeeze)

edit ZSH 4.3.10-14 on the Squeeze machine and 4.3.17-1 on Wheezy

@OffbeatPlanet
Copy link

I have this issue too, on two different machines, both on ubuntu 12.10 x64. One of them was an upgrade from 12.04, the other one was a clean install. history-substring-search doesn't work on either.

zsh 5.0.0 (x86_64-unknown-linux-gnu)

@cutalion
Copy link

cutalion commented Dec 5, 2012

+1, Ubuntu 12.10, clean install.
It seems a zsh bug in Ubuntu - https://bugs.launchpad.net/ubuntu/+source/zsh/+bug/1048212

@cutalion
Copy link

cutalion commented Dec 5, 2012

Fortunately, there is a workaround.

Put this line to ~/.zshenv:

DEBIAN_PREVENT_KEYBOARD_CHANGES=yes

@OffbeatPlanet
Copy link

Great! It works! Thanks cutalion!

@daubman
Copy link

daubman commented Dec 7, 2012

When Oh My ZSH updated on my mac (10.8.2) this started happening to me as well =(

@Adarsh-Barik
Copy link

Same issue here with unity 12.10. Even work around didn't work for me.

@ranjanashish
Copy link

DEBIAN_PREVENT_KEYBOARD_CHANGES=yes

does not work for me either :(

System: Ubuntu 12.10

@mmacedo
Copy link

mmacedo commented Jan 25, 2013

@cutalion's suggestion worked for me.

@sotte
Copy link

sotte commented Feb 4, 2013

Any news here? I have the same problem and the workaround does not work for me.

@ajpaulson
Copy link

@sotte the default setup started working for me again except on one machine where I had enabled some plugins that weren't enabled on the working ones. I disabled them and it works out of the box again.

Double check which plugins you have enabled and test if any of them is still breaking it.

@sotte
Copy link

sotte commented Feb 4, 2013

Here is my .zshrc. No plugin is enabled. The workaround has no effect.

ZSH=$HOME/.oh-my-zsh
ZSH_THEME="robbyrussell"
#DEBIAN_PREVENT_KEYBOARD_CHANGES=yes
plugins=(history-substring-search)
source $ZSH/oh-my-zsh.sh

@ajpaulson
Copy link

hmm.

What version of ZSH do you have?

What commit of Oh-My-Zsh are you at?

EDIT also - did you comment out the workaround because it had no effect or did you add it already commented?

@sotte
Copy link

sotte commented Feb 5, 2013

I tried it with and without the workaround. No effect.

omz is the current version: 615e41b
zsh 5.0.0 (x86_64-unknown-linux-gnu)

@sotte
Copy link

sotte commented Feb 6, 2013

I have no problems with Ubutu 12.04 and zsh 4.3.17 (x86_64-unknown-linux-gnu). The config is the same. The workaround is not activated.

@mogren
Copy link

mogren commented Feb 10, 2013

Same problem for me, and setting DEBIAN_PREVENT_KEYBOARD_CHANGES=yes doesn't help.

@corpix
Copy link

corpix commented Feb 11, 2013

Strange that this workaround don't work for some people...I have export DEBIAN_PREVENT_KEYBOARD_CHANGES=yes in my .zshrc and backward search works perfect for me under Ubuntu 12.10.

On 11.02.2013, at 1:48, Claes Mogren notifications@github.com wrote:

Same problem for me, and setting DEBIAN_PREVENT_KEYBOARD_CHANGES=yes doesn't help.


Reply to this email directly or view it on GitHub..

@newgene
Copy link

newgene commented Mar 7, 2013

In case it's helpful. I have Ubuntu 12.10, zsh 5.0.0 (x86_64-unknown-linux-gnu) with the same issue initially.

Putting "export DEBIAN_PREVENT_KEYBOARD_CHANGES=yes" in .zshrc does not fix the issue.
But putting "DEBIAN_PREVENT_KEYBOARD_CHANGES=yes" into .zshenv appears solving the problem for me.

Could be related to the order of setting this variable.

@Asmmund
Copy link

Asmmund commented Mar 9, 2013

xubuntu 12.10
updating .zshrc with DEBIAN_PREVENT_KEYBOARD_CHANGES=yes solved the issue

@Pawka
Copy link

Pawka commented Mar 12, 2013

Same issue here. Updated to Ubuntu 12.10. Code below doesn't help:

Fixed with adding this into .zshenv (not .zshrc):

DEBIAN_PREVENT_KEYBOARD_CHANGES=yes

@Asmmund
Copy link

Asmmund commented Mar 12, 2013

did you try putting it in .zshrc and .zshenv ?

On 12 March 2013 09:22, Povilas Balzaravičius notifications@github.comwrote:

Same issue here. Updated to Ubuntu 12.10. Code below doesn't help:

DEBIAN_PREVENT_KEYBOARD_CHANGES=yes


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

@Pawka
Copy link

Pawka commented Mar 12, 2013

Yes, found solution immediately after posted comment. Editing .zshrc is not required at all. Thanks!

@Asmmund
Copy link

Asmmund commented Mar 12, 2013

editing .zshrc sometimes it works... but shouldn't!
.zshenv is the one to be edited

@mmichelli
Copy link

Worked for my ubuntu

@Xqua
Copy link

Xqua commented Apr 16, 2013

Worked for me THANKS Damn it made my day :D

PS : Linux Mint 14 (based on ubuntu 12.10)

@thuandt
Copy link
Contributor

thuandt commented Apr 27, 2013

Worked for me
Ubuntu 13.04, zsh 5.0.0-2ubuntu3

@quasipedia
Copy link

@cutalion - Great, it works, many thanks! :)
@robbyrussell - Are you going to make this as part of the installation script? If not, then probably this issue should be closed, as it seems is ubuntu-specific... (or?)

@mrw
Copy link

mrw commented Apr 16, 2014

The fix mentioned by @jvf here worked for me on OSX 10.9.2 also!

@AndrewGuenther
Copy link

@robbyrussell This issue has been open for a year and a pull request (#2511) ready for about a month now. Any chance on seeing this merged soon?

@mcornella
Copy link
Member

#2511 has been merged. Update oh-my-zsh and check that it works, then close the issue.
/cc @seriyps

@seriyps
Copy link
Author

seriyps commented Apr 20, 2014

Works for me

@billcarroll
Copy link

The most recent oh-my-zsh update just broke this for me again on Mac OS 10.9.2

@quasipedia
Copy link

@billcarroll - Yeah, for me it broke again too (a few days back actually, but I wouldn't be able to pin-point which update).

If it weren't annoying, it would be funny how often this brakes! :-/

@bgvaughan
Copy link

I'm experiencing this issue on Fedora 20, and have been for some months. Adding DEBIAN_PREVENT_KEYBOARD_CHANGES=yes to .zshenv did not change anything. Moving 'history-substring-search' to the end of the plugin list in .zshrc did not change anything.

I notice that it works fine on NetBSD, through tmux, with TERM=screen.

@zweifisch
Copy link

adding

bindkey '\e[A' history-substring-search-up
bindkey '\e[B' history-substring-search-down

after loading omz works for me, with TERM=screen-256color

joeybaker added a commit to joeybaker/dotfiles that referenced this issue May 23, 2014
@joeybaker
Copy link

@zweifisch Awesome! That's great, thank you!

FWIW, that also works with TERM=xterm-256color (and through tmux)

@billcarroll
Copy link

Is a fix planned for this?

@m6w6
Copy link

m6w6 commented Oct 1, 2014

Here's what I use to make it work again:

# history-substring-search stopped working; see `man terminfo`
# keyboard generates cuu1/cud1 instead of kcuu1/kcud1
bindkey "$terminfo[cuu1]" history-substring-search-up
bindkey "$terminfo[cud1]" history-substring-search-down

@Foxboron
Copy link

Foxboron commented Oct 6, 2014

This bug started to appear for me recently. None of the solutions given above works for me.

@jondlm
Copy link

jondlm commented Oct 10, 2014

I'm having the same issue. On the latest (96e4e5d) with Mac OSX 10.9.5. Here's my plugin setup:

plugins=(git osx history-substring-search)

Strangely, if I source ~/.oh-my-zsh/plugins/history-substring-search/history-substring-search.zsh the plugin directly it works just fine. Any thoughts?

@robbyrussell
Copy link
Member

Going to close this one out... and hope that it's resolved for folks. (we can open up new issues as necessary)

@gravis
Copy link

gravis commented Jun 30, 2015

I'm having this issue since a few days, on Debian, and Mac OS 10.10.3. None of the tips above is working.

@cchamberlain
Copy link

For me it appeared to be something I did corrupted the .zcompdump / .zcompdump.zwc files on Mac. I trashed the files and restarted the shell and my issue appears to be gone.

@billcarroll
Copy link

broken on OS X again for me after the last update

@akoo1010
Copy link

akoo1010 commented Oct 9, 2015

also running into the issue. As m6w6 fix worked:

bindkey "$terminfo[cuu1]" history-substring-search-up
bindkey "$terminfo[cud1]" history-substring-search-down

@donnykurnia
Copy link

I'm running just fine in OSX under gnu screen inside iTerm. Try to close all screen and iTerm and start again after update zsh and oh-my-zsh.

@sgsvnk
Copy link

sgsvnk commented Sep 20, 2016

This started happening again with zsh recent update. None of the above mentioned suggestions are working. No .zshenv file in my machine.

This is the returned error:
_history-substring-search-end:13: _zsh_highlight: function definition file not found

I don't have zsh-syntax-highlighting folder in my plugins folder ~/.oh-my-zsh/plugins/. I doubt that _zsh_highlight is supposed to be imported from zsh-syntax-highlighting.

zsh 5.0.8 (x86_64-apple-darwin15.0)
OS X El Capital 10.11.6

Can someone please point me to the solution?

@sgsvnk
Copy link

sgsvnk commented Sep 20, 2016

I think _zsh_highlight should be used carefully by checking if it is available. Here is the line reference.

Commenting out this line, works as a workaround for this problem. But I hope there will be a release with the fix.

@shadowhand
Copy link
Contributor

shadowhand commented Oct 27, 2016

Same error here as what @sgsvenkatesh reported.

@sgsvnk
Copy link

sgsvnk commented Oct 28, 2016

@shadowhand The issue as resolved for me a few weeks back after updating zsh to the latest version. You should try it.

@shadowhand
Copy link
Contributor

This happened after upgrading to current master. Appears to have gone away again.

@rajivpoddar
Copy link

rajivpoddar commented Jun 5, 2017

Same issue on osx. Commenting out the call to _zsh_highlight worked for me. Highlighting works fine even without it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: plugin Issue or PR related to a plugin Bug Something isn't working Platform: Linux Issue or PR for a Linux system
Projects
None yet
Development

No branches or pull requests