Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Zsh changes on Ubuntu



Hello,

let me put on my debian pkg-zsh team hat on for this one...

Thorsten Kampe wrote:
> I'm using Zsh in connection with Fizsh bindings on Ubuntu 12.04. 
> Fizsh has a very useful feature (similar to up-line-or-beginning-
> search) to the effect that the cursor keys would do a "sub-string-
> search". So if you typed ssh and used the cursor keys, it would 
> search in the history for the next entry which contained ssh.
>
> This feature doesn't work anymore in Ubuntu 13.10 and 14.04 (not sure 
> about 12.10 and 13.04)
>
> Zsh is 4.3.17 on Ubuntu 12.04. On Ubuntu 13.10 it is 5.0.2. 
> Additionally there is now a zsh-common package. Fizsh is still the 
> same version as on Ubuntu 12.04. Fizsh works fine on Cygwin (which 
> also uses 5.0.2.
>
> How can I troubleshoot this issue?

Since ubuntu is debian's downstream, I'm pretty sure this may be tied to
a change in debian's global zshrc: In pre-5.x packages, debian used a
rather broken approach trying to read escape sequences for special keys
from the terminfo database.

Starting with the package for 5.0.0 and onward¹, that was fixed by
setting the terminal zsh is running in into the correct mode for the
values from terminfo to be applicable while zsh's line editor (ZLE) is
running. This was done to make the setup work across as many different
terminals as possible.

If you had bound keys to hard-coded escape sequences that worked outside
of that mode, those may be invalid with that mode active. To bind
something to - say - the Up-Cursor key, you'd do this:

  bindkey "${key[Up]}" some-widgets-name

To get a list of valid keys for the ‘$key[]’ map:

  print ${(k)key}

We also added an entry to the package's NEWS file about this change².
The file also mentions a "Get out of my way, I know what I'm doing!"
variable, that serves as a way to disable the package's keyboard setup,
should you want to go a different route.


Regards, Frank

¹ http://anonscm.debian.org/gitweb/?p=collab-maint/zsh.git;a=blob;f=debian/zshrc;hb=HEAD
² http://anonscm.debian.org/gitweb/?p=collab-maint/zsh.git;a=blob;f=debian/NEWS;hb=HEAD

-- 
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
                                                  -- RFC 1925



Messages sorted by: Reverse Date, Date, Thread, Author