delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=0.9 required=5.0 tests=BAYES_40,RCVD_IN_DNSWL_NONE,SARE_MSGID_LONG45 |
X-Spam-Check-By: | sourceware.org |
MIME-Version: | 1.0 |
In-Reply-To: | <h2h416096c61004071337g6a00e829m800c2537fd7277ee@mail.gmail.com> |
References: | <h2s70497a8b1004071058y42def0beh1a04fe60cdc2a894 AT mail DOT gmail DOT com> <h2h416096c61004071337g6a00e829m800c2537fd7277ee AT mail DOT gmail DOT com> |
From: | Kent Larsson <kent DOT larsson AT euroling DOT se> |
Date: | Thu, 8 Apr 2010 11:19:06 +0200 |
Message-ID: | <v2x70497a8b1004080219p495193ado7257607fbb31bee9@mail.gmail.com> |
Subject: | Re: Problem with Shift+Left or Right arrow in Cygwin locally (Ctrl isn't noticed) and through SSH (escape code isn't interpreted correctly) |
To: | cygwin AT cygwin DOT com |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
>> If I'm in Bash on my Ubuntu system I can use Ctrl+Left Arrow or Right >> Arrow to navigate one word at a time to the left and right. When I use >> Cygwin it doesn't react to the Ctrl, responding as if I only had >> pressed the Left or Right Arrow. Is there a way to fix this? > > The standard Bash shortcuts for moving by a word that are Alt+f and > Alt+b, so "fix" is a bit strong here. But anyway, stick these two > lines into ~/.inputrc, restart bash, and you should be set: > > "\e[1;5D": backward-word > "\e[1;5C": forward-word > > And here's one way to put Ctrl+Up/Down to use: > > "\e[1;5A": history-search-backward > "\e[1;5B": history-search-forward I didn't know that ctrl+left and ctrl+right wasn't standard shortcuts in Bash. It's "always" (in my limited experience) been available so I guess I just assumed. With this new information I agree that fix is a bit strong, altough it did fix my problem. Thank you! :-) > > Shift combinations have a 2 instead of the 5, in case you want to map > those to something. See this link for details on bash/readline key > bindings: > > http://www.gnu.org/software/bash/manual/bashref.html#Command-Line-Editing Interesting. I'll check it out. > >> The next step is when I log in from an Ubuntu 9.10 system to Cygwin 6 >> using SSH. > > Cygwin 6? Anyway, the above should work in this case as well, as long > as you're using an xterm-compatible terminal on Ubuntu, which you are. I got it from: kentl AT kentl ~ $ uname -a CYGWIN_NT-6.0 kentl 1.7.1(0.218/5/3) 2009-12-07 11:48 i686 Cygwin And thought it would be a good indicator of what I was using. I realise now that I should have written Cygwin 1.7.x. > >> $ echo $TERM >> xterm > > Andy Thank you for your nice and informative reply! -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |