mintty and readline mapping

2009-08-26 Thread Vince Rice
mintty 0.4.4 on CYGWIN_NT-5.1 SRSMBPROWIN 1.7.0(0.212/5/3) 2009-08-20 10:56 
i686 Cygwin

I'm trying to map ctrl-tab in mintty and can't seem to get it working. I've 
Googled bash and key bindings, key mapping, etc., but haven't found anything 
that helps with the problem.

I'm trying to bind ctrl-tab to reverse-menu-complete. 
cat .inputrc
# use ctrl-left/right to jump between words
;5C: forward-word
;5D: backward-word

# enable inline completion
TAB: menu-complete
;5I: reverse-menu-complete

The ctrl-left/right mappings above work (that took me a while by itself -- 
those keys map with \e[5C and \e[5D  on OS X, my other available Unix right 
now). The ctrl-tab key displays ;5I (that's a capital-eye) when pressed, 
which makes it look like the above is tantalizingly close.

What am I missing? If this is a generic mapping issue, feel free to point me to 
somewhere else to look.

Thanks,

Vince



  
Cygwin Configuration Diagnostics
Current System Time: Wed Aug 26 15:44:59 2009

Windows XP Professional Ver 5.1 Build 2600 Service Pack 2

Path:   C:\cygwin\home\vrice\bin
C:\cygwin\usr\local\bin
C:\cygwin\bin
C:\cygwin\bin
C:\cygwin\usr\X11R6\bin
C:\bat
C:\utils
C:\Programs\Perl\bin
C:\cygwin\bin
C:\WINDOWS\system32
C:\WINDOWS
C:\WINDOWS\System32\Wbem
C:\Program Files\Microsoft SQL Server\80\Tools\BINN
C:\Programs\MSSQL\100\DTS\Binn\
C:\Programs\MSSQL\100\Tools\Binn\VSShell\Common7\IDE\
C:\Programs\MSSQL\100\Tools\Binn\
C:\Program Files\Microsoft Visual Studio 
9.0\Common7\IDE\PrivateAssemblies\
C:\WINDOWS\system32\WindowsPowerShell\v1.0

Output from C:\cygwin\bin\id.exe (nontsec)
UID: 1004(vrice)GID: 513(None)
544(Administrators) 545(Users)  513(None)

Output from C:\cygwin\bin\id.exe (ntsec)
UID: 1004(vrice)GID: 513(None)
544(Administrators) 545(Users)  513(None)

SysDir: C:\WINDOWS\system32
WinDir: C:\WINDOWS

USER = 'vrice'
PWD = '/home/vrice'
HOME = '/home/vrice'

HOMEPATH = '\Documents and Settings\vrice'
MANPATH = '/usr/local/man:/usr/share/man:/usr/man::/usr/ssl/man'
APPDATA = 'C:\Documents and Settings\vrice\Application Data'
HOSTNAME = 'SRSMBPROWIN'
TERM = 'xterm'
PROCESSOR_IDENTIFIER = 'x86 Family 6 Model 23 Stepping 6, GenuineIntel'
WINDIR = 'C:\WINDOWS'
CVSROOT = '/z/Documents/cvs'
OLDPWD = '/c/Documents and Settings/vrice'
USERDOMAIN = 'SRSMBPROWIN'
OS = 'Windows_NT'
ALLUSERSPROFILE = 'C:\Documents and Settings\All Users'
TEMP = '/c/tmp'
COMMONPROGRAMFILES = 'C:\Program Files\Common Files'
USERNAME = 'vrice'
PAGER = 'less'
PROCESSOR_LEVEL = '6'
FP_NO_HOST_CHECK = 'NO'
SYSTEMDRIVE = 'C:'
USERPROFILE = 'C:\Documents and Settings\vrice'
CLIENTNAME = 'Console'
PS1 = '$logn...@srsmbprowin:$PWD\'
LOGONSERVER = '\\SRSMBPROWIN'
PROCESSOR_ARCHITECTURE = 'x86'
HISTCONTROL = 'ignoredups'
J2D_D3D = 'false'
SHLVL = '1'
PATHEXT = '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.PSC1'
HOMEDRIVE = 'C:'
COMSPEC = 'C:\WINDOWS\system32\cmd.exe'
LESS = '-c -X'
TMP = '/c/tmp'
SYSTEMROOT = 'C:\WINDOWS'
PRINTER = 'HP4345#:2'
CVS_RSH = '/bin/ssh'
PROCESSOR_REVISION = '1706'
lib = 'C:\Program Files\SQLXML 4.0\bin\'
INFOPATH = '/usr/local/info:/usr/share/info:/usr/info:'
PROGRAMFILES = 'C:\Program Files'
NUMBER_OF_PROCESSORS = '1'
SESSIONNAME = 'Console'
COMPUTERNAME = 'SRSMBPROWIN'
_ = '/usr/bin/cygcheck'

HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2
  (default) = '/cygdrive'
  cygdrive flags = 0x0022
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/
  (default) = 'C:\cygwin15'
  flags = 0x0002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/usr/bin
  (default) = 'C:\cygwin15/bin'
  flags = 0x0002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/usr/lib
  (default) = 'C:\cygwin15/lib'
  flags = 0x0002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options
HKEY_CURRENT_USER\Software\Cygwin
HKEY_CURRENT_USER\Software\Cygwin\Program Options
HKEY_CURRENT_USER\Software\Cygwin\setup
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\Program Options
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\Program Options
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\setup
  (default) = 'C:\cygwin'

obcaseinsensitive set to 1

a:  fd N/AN/A
c:  hd  NTFS 32757Mb  35% CP CS UN PA FC 
d:  cd N/AN/A
e:  net HGFS304917Mb  55% CP Shared Folders
p:  net NTFS133120Mb  73% CP CS UN PAIT
r:  net NTFS133120Mb 100% CP CS UN PACustSe
z:  net HGFS304917Mb  55% CP Shared Folders

Warning: Mount entries should not have a trailing (back)slash

C:\cygwin  / system  

Re: mintty and readline mapping

2009-08-26 Thread Andy Koppe
Vince Rice:
 I'm trying to map ctrl-tab in mintty and can't seem to get it working. I've 
 Googled bash and key bindings, key mapping, etc., but haven't found anything 
 that helps with the problem.

How about the mintty manual?


 I'm trying to bind ctrl-tab to reverse-menu-complete.

There's no standard for Ctrl+Tab, which is to say, xterm sends the
same as for plain Tab.

MinTTY sends \e[1;5I for Ctrl+Tab and \e[1;6I for Ctrl+Shift+Tab.


cat .inputrc
 # use ctrl-left/right to jump between words
 ;5C: forward-word
 ;5D: backward-word

 # enable inline completion
 TAB: menu-complete
 ;5C: forward-word
 ;5D: backward-word
 ;5I: reverse-menu-complete

Those are incomplete, i.e. you're relying on readline swallowing part
of the keycode.

Those should be:
\e[1;5C: forward-word
\e[1;5D: backward-word
\e[1;5I: reverse-menu-complete

Have a look at the tips section of the mintty manual as well; it's got
some more key bindings you might want.

Andy

--
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