I added a context menu item 'Cygwin shell here' for Windows' Explorer.
--- e:/cygwin/rxvt-here.reg --- 8< ------
[HKEY_CLASSES_ROOT/Drive/shell/bashHere]
@="Shell: Cygwin shell here"
[HKEY_CLASSES_ROOT/Drive/shell/bashHere/command]
@="E://Cygwin//rxvt-here.bat /"%1/""
[HKEY_CLASSES_ROOT/Directory/shell/bash/Here]
@="Shell: Cygwin shell here"
[HKEY_CLASSES_ROOT/Directory/shell/bash/Here/command]
@="E://Cygwin//rxvt-here.bat /"%1/""
-------------------------------- >8 -------
(注: 上述斜线均应该为反斜线,这里的blog不支持反斜线,只好这样了)
--- e:/cygwin/rxvt-here.bat ---- 8< -----
@echo off
E:
chdir /cygwin/bin
echo.exe -n "cd " > cygwin/tmp/cygwin_here.rc
cygpath -u %1 >> cygwin/tmp/cygwin_here.rc
start rxvt -bg black -fg white -sr -sl 3000 -fn Courier-12 -geometry 100x400 -e /bin/bash -login
-------------------------------- >8 -------
(注: 上述斜线除最后的/bin/bash外均应该为反斜线,这里的blog不支持反斜线,只好这样了)
--- ~/.bash_profile ------- 8< -----
...[snip]
[ -r /tmp/cygwin_here.rc ] && . /tmp/cygwin_here.rc && rm -f /tmp/cygwin_here.rc
--------------------------- >8 -----------
没有评论:
发表评论