Bug 628260 - RFE: zsh's default configuration should match inputrc, for compat. with bash/etc.
Summary: RFE: zsh's default configuration should match inputrc, for compat. with bash/...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: zsh
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Dominic Hopf
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-29 01:14 UTC by Felipe Contreras
Modified: 2012-02-02 21:29 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-02 19:40:10 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Felipe Contreras 2010-08-29 01:14:10 UTC
The inputrc file is used for readline, but zsh doesn't use it, so in order to match they keys configuration this has to be on /etc/zshrc:

bindkey "\e[1~" beginning-of-line
bindkey "\e[4~" end-of-line
bindkey "\e[5~" history-beginning-search-backward
bindkey "\e[6~" history-beginning-search-forward
bindkey "\e[3~" delete-char
bindkey "\e[2~" quoted-insert
bindkey "\e[5C" forward-word
bindkey "\e[5D" backward-word
bindkey "\e[1;5C" forward-word
bindkey "\e[1;5D" backward-word

# for rxvt
bindkey "\e[8~" end-of-line
bindkey "\eOc" forward-word
bindkey "\eOd" backward-word

# for non RH/Debian xterm, can't hurt for RH/DEbian xterm
bindkey "\eOH" beginning-of-line
bindkey "\eOF" end-of-line

# for freebsd console
bindkey "\e[H" beginning-of-line
bindkey "\e[F" end-of-line

This is copied directly from /etc/inputrc and slightly modified for zle's format.

Comment 1 Felipe Contreras 2011-02-04 21:17:28 UTC
Hello?

Comment 2 Felipe Contreras 2011-04-22 17:50:15 UTC
Helloooo?

Comment 3 Felipe Contreras 2011-05-13 15:29:21 UTC
Hellooooo?

This is a trivial change, very easy to do.

What do you need to get this done? A build with the fix in koji?

Comment 4 Bug Zapper 2011-05-31 15:09:50 UTC
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '13'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 13 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 5 Felipe Contreras 2011-05-31 20:45:17 UTC
Sigh.

Comment 6 James Antill 2011-06-01 16:10:05 UTC
 Ok, let's try this. Can you answer a few questions?


1. What is the reason for zsh to "be 100% compatible" with readline/bash.

2. Is this just a zsh/bash thing ... if so, why?

3. Why is this not a user configuration thing?

4. After you apply the above bindkey's what has changed on the zsh side, is it just keys that did nothing now do something ... or do some keys change their behaviour from X to Y?

5. How often does /etc/inputrc change (or how much will someone have to keep updating zsh).

Comment 7 Felipe Contreras 2011-06-01 17:25:29 UTC
(In reply to comment #6)
>  Ok, let's try this. Can you answer a few questions?
> 
> 1. What is the reason for zsh to "be 100% compatible" with readline/bash.

Consistency is good?

Nobody said anything about 100% compatibility, but if you can make things more similar, what's the reason not to?

> 2. Is this just a zsh/bash thing ... if so, why?

Not really, more like zsh/readline. Because zsh doesn't use readline.

> 3. Why is this not a user configuration thing?

Why /etc/inputrc isn't?

> 4. After you apply the above bindkey's what has changed on the zsh side, is it
> just keys that did nothing now do something ... or do some keys change their
> behaviour from X to Y?

Mostly now do something.

> 5. How often does /etc/inputrc change (or how much will someone have to keep
> updating zsh).

How should I know? I haven't seen many updates over the years, maybe once per decade?

Comment 8 Dominic Hopf 2011-12-18 02:45:23 UTC
The stuff for the Ins button does not seem to work correctly here. I'm getting nothing pasted to the Terminal but see the string "^[[2~" when pressing Ins for two times. This is a quite weird issue, I've checked several cases, clean configuration, changed Terminal, SSH'd to my CentOS 5.6 box.. and then changed to bash to see if the stuff is working there.. effectively this seems a more generic issue since there  is never really stuff pasted to the Terminal like I would expect when I usually do a Ctrl-Shift-V. Maybe someone can advise me if I am doing something wrong or misunderstood something for this one:

    bindkey "\e[2~" quoted-insert



While investigating and googling for this issue, I stumbled over this page:

   https://wiki.archlinux.org/index.php/Zsh

which contains a quite nice solution for the actual issue:

   # bind special keys according to readline configuration
   eval "$(sed -n 's/^/bindkey /; s/: / /p' /etc/inputrc)"

Comment 9 Felipe Contreras 2012-02-02 19:13:57 UTC
(In reply to comment #8)
> which contains a quite nice solution for the actual issue:
> 
>    # bind special keys according to readline configuration
>    eval "$(sed -n 's/^/bindkey /; s/: / /p' /etc/inputrc)"

This doesn't work.

Comment 10 Felipe Contreras 2012-02-02 19:40:10 UTC
Nobody seems to care, so why bother.

Comment 11 Dominic Hopf 2012-02-02 20:44:36 UTC
Felipe, it seems you're ignoring the fact that I reassigned this issue to me and had a question in my previous reply which still is unanswered. You could've at least answer to that question.

I have been willing to actually take care of this issue, but without the reporter taking note of my issues I have with his suggestions this actually isn't that easy, unfortunately.

Comment 12 Felipe Contreras 2012-02-02 21:29:08 UTC
(In reply to comment #11)
> Felipe, it seems you're ignoring the fact that I reassigned this issue to me
> and had a question in my previous reply which still is unanswered. You could've
> at least answer to that question.

Yes, and you could have just tried it yourself.

> I have been willing to actually take care of this issue, but without the
> reporter taking note of my issues I have with his suggestions this actually
> isn't that easy, unfortunately.

I reported this in 2010. It took you more than *one year* to answer, and it took me a few months to answer you back, and again, you could have just tried yourself.

In any case, this is not *my* issue, it's a *Fedora* issue, that affects *Fedora* users. You are not doing me a favor, I am doing the project a favor by trying to pursue this.

I investigated simpler ways to achieve this, but there just aren't any, this is the best I found. You could have just applied the changes and we'd be done with it, but alas.

I don't plan to use Fedora anymore. And I don't plan to keep track of my reported bugs, almost all of which were never fixed. If you want to fix this bug, go ahead, but I don't know what you are waiting for.


Note You need to log in before you can comment on or make changes to this bug.