X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: <4DB96020.7010100@cs.umass.edu> References: <87ei4w6hvx DOT fsf AT newsguy DOT com> <4DAF035B DOT 6030408 AT redhat DOT com> <4DAF140A DOT 8050501 AT cs DOT umass DOT edu> <87aafbc86s DOT fsf AT newsguy DOT com> <874o5jc75l DOT fsf AT newsguy DOT com> <4DB96020 DOT 7010100 AT cs DOT umass DOT edu> Date: Sat, 7 May 2011 19:24:26 +0100 Message-ID: Subject: Re: Why doesn't ~/inputrc work From: Andy Koppe To: moss AT cs DOT umass DOT edu, cygwin AT cygwin DOT com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On 28 April 2011 13:40, Eliot Moss wrote: > I took a while to play around. One thing you may need to > do is set the TERM environment variable to a proper, more > capable, terminal (such as "cygwin"). > > Beyond that, I found that I needed to: > > set convert-meta on That's not a solution for everyone, because it makes it impossible to enter characters beyond 7-bit ASCII. The setting means that input bytes with the eighth bit set have that bit cleared and are prefixed by an escape character instead. > in my .inputrc and also to write the escape sequences as > (for example): > > "\M-b": "echo meta b" To make this work without enabling convert-meta, try using "\eb" instead of "\M-B". Here's why: back in the olden days, character codes were 7 bits wide, so there was one bit to spare in your usual 8-bit byte, and the Meta modifier key could be used to set that. Then those pesky foreign types came along and claimed the eigth bit for their =C3=BCml=C3=A4=C3=BCts and other funny characters, which obviously collided= with the Meta bit. Therefore, a different scheme became necessary to encode the Alt (n=C3=A9e Meta) modifier: instead of setting the eighth bit, most terminal emulators these days send an escape character prefix. Inevitably, there's confusion on whether "Meta" should only refer to ye olde eighth-bit scheme, or to the escape prefix scheme too. In bash/readline's .inputrc without convert-meta on, the "\M-" refers to the eighth-bit scheme only, so an Alt+b keypress sending Escape followed by 'b' doesn't match "\M-b". In fact, with Cygwin's default UTF-8 locale, a byte representing 'b' with the eighth bit set (i.e. 0xE2) actually constitutes an incomplete character sequence, hence readline simply ignores such a key binding. =C3=84ndy -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple