Closed seriyps closed 9 years ago
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: 22f827e122187032afb1f473d19a4238899e8ecd, dotfiles
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
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)
+1, Ubuntu 12.10, clean install.
It seems a zsh
bug in Ubuntu - https://bugs.launchpad.net/ubuntu/+source/zsh/+bug/1048212
Great! It works! Thanks cutalion!
When Oh My ZSH updated on my mac (10.8.2) this started happening to me as well =(
Same issue here with unity 12.10. Even work around didn't work for me.
DEBIAN_PREVENT_KEYBOARD_CHANGES=yes
does not work for me either :(
System: Ubuntu 12.10
@cutalion's suggestion worked for me.
Any news here? I have the same problem and the workaround does not work for me.
@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.
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
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?
I tried it with and without the workaround. No effect.
omz is the current version: 615e41b0ecdb25acba513fd09619bd56c2eb24eb zsh 5.0.0 (x86_64-unknown-linux-gnu)
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.
Same problem for me, and setting DEBIAN_PREVENT_KEYBOARD_CHANGES=yes doesn't help.
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..
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.
xubuntu 12.10
updating .zshrc
with DEBIAN_PREVENT_KEYBOARD_CHANGES=yes
solved the issue
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
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/robbyrussell/oh-my-zsh/issues/1433#issuecomment-14761849 .
Yes, found solution immediately after posted comment. Editing .zshrc
is not required at all. Thanks!
editing .zshrc
sometimes it works... but shouldn't!
.zshenv
is the one to be edited
Worked for my ubuntu
Worked for me THANKS Damn it made my day :D
PS : Linux Mint 14 (based on ubuntu 12.10)
Worked for me Ubuntu 13.04, zsh 5.0.0-2ubuntu3
@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?)
this is something I've suffered with for many months, and just dealt with. Finding this fix just made my month.
Its working for me but i am getting this message whenever I use it _history-substring-search-end:9: _zsh_highlight: function definition file not found system: ubuntu 13.04
I have the same problem on OS X 10.8.3, zsh 5.0.2 (x86_64-apple-darwin12.2.0), newest omz master
sorry, my bad. I didn't realize that zsh-syntax-highlighting doesn't come with default installation of oh-my-zsh. Installing zsh-syntax-highlighting in plugins directory solved the issue. Commenting 9th line in the function _history-substring-search-end function in history-substring-search.zsh also works if you don't use syntax highlighting.
Just to add another data point, adding DEBIAN_PREVENT_KEYBOARD_CHANGES=yes
to ~/.zshenv
worked for me on Ubuntu 13.04 64-bit, ZSH 5.0.0
None of these suggestions were working for me on Ubuntu 13.04 with zsh 5.0.0. The thing that finally worked for me was to put the following at the BOTTOM of my .zshrc:
source $ZSH/plugins/history-substring-search/history-substring-search.zsh
I do a fair amount of customizations in my .zshrc including RVM (ruby version manager). I am guessing that something else was conflicting with my history-substring-search.
Funny. On a different Ubuntu 13.04 machine of mine, the echo "DEBIAN_PREVENT_KEYBOARD_CHANGES=yes" >> ~/.zshenv
worked like a champ. Oh well. I'm glad it is working regardless. BTW, I'm happy there are some good solutions on bug.
+1. Same problem on Ubuntu 12.10 x64 Desktop with zsh 5.0.0 and rvm
source $ZSH/plugins/history-substring-search/history-substring-search.zs
at the bottom of my .zshrc does the trick.
It's somewhere in the debian plugin, worked again for me as soon as i'd deactivated the debian plugin in .zshrc.
Confusing is, reactivating of the debian plugin don't break it again...
I ran into this on Debian 7.2, and nothing worked until I added source $ZSH/plugins/history-substring-search/history-substring-search.zs
at the end of my .zshrc .
On my Mac (zsh 5.0.2) the commit which introduces the defect seems to be https://github.com/zsh-users/zsh-history-substring-search/commit/82fbef5132b44c5d039e7d25972d9351c5936bc2
It's not working here too. zsh 5.0.2 and Ubuntu 13.10.
None of the above fixes worked either...
The DEBIAN_PREVENT_KEYBOARD_CHANGES
fix in .zshenv
worked for me. Using Zsh 5.0.0 and Ubuntu 13.04.
Got it working on Ubuntu 13.10 by adding the paste-safe
plugin (suggested here: https://github.com/robbyrussell/oh-my-zsh/issues/1720).
No DEBIAN_PREVENT_KEYBOARD_CHANGES=yes
and no source $ZSH/plugins/history-substring-search/history-substring-search.zsh
(both didn't work anymore).
@jvf - :+1: That solved the issue for me too (and home/end work again!) :)
Fixed on Ubuntu 13.10 by adding those two line in my .zshrc
bindkey '\eOA' history-substring-search-up
bindkey '\eOB' history-substring-search-down
I also have DEBIAN_PREVENT_KEYBOARD_CHANGES=yes
in my zshenv
Neither adding paste-safe
nor using the bindkey
-trick worked for me. I still have no substring history…
Perhaps there is something wrong in general with my plugin setup…
plugins=(vagrant cabal git git-flow gitignore bundler rails github rvm sublime composer history-sub string-search command-not-found zsh-syntax-highlighting)
on my ubuntu 12.04 i added this to .zshrc
:
zmodload zsh/terminfo
bindkey "$terminfo[kcuu1]" history-substring-search-up
bindkey "$terminfo[kcud1]" history-substring-search-down
and I've DEBIAN_PREVENT_KEYBOARD_CHANGES=yes
in my .zshenv
@Eustachy's trick works for me.
As @Eustachy suggested, using
bindkey "$terminfo[kcuu1]" history-substring-search-up
bindkey "$terminfo[kcud1]" history-substring-search-down
instead of
bindkey '\e[A' history-substring-search-up
bindkey '\e[B' history-substring-search-down
fixed it for me (on Mac OS X, will test my Ubuntu machine at the beginning of next week) and is a lot cleaner than the paste-safe hack.
To add a (possible) explanation:
The problem seems to be 174c9177aa34b4c05bb5a1c6f637e6fa479a8e10 introduced 9 days ago through PR https://github.com/robbyrussell/oh-my-zsh/pull/1355. This commit changed the keybindings in lib/key-bindings.zsh
from
bindkey '^[[A' up-line-or-search # start typing + [Up-Arrow] - fuzzy find history forward
bindkey '^[[B' down-line-or-search # start typing + [Down-Arrow] - fuzzy find history backward
to
bindkey "${terminfo[kcuu1]}" up-line-or-search # start typing + [Up-Arrow] - fuzzy find history forward
bindkey "${terminfo[kcud1]}" down-line-or-search # start typing + [Down-Arrow] - fuzzy find history backward
When one now attempts to override the keybindings from lib/key-bindings.zsh
with '\e[A'
(or '^[[A'
) and '\e[B'
(or '^[[B'
) this doesn't work anymore, so one has to use the terminfo key codes kcuu1
and kcud1
.
+1 @Eustachy's trick works for me.
@Eustachy / @jvf thanks so much for the fix
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 fromls
.My .zshrc
ZSH version