在cygwin中将rxvt登录批转换为mintty

在cygwin中将rxvt登录批转换为mintty,cygwin,rxvt,mintty,Cygwin,Rxvt,Mintty,这是我的cygwin.bat文件,用于通过rxvt启动cygwin终端窗口 @echo off C: set PATH=%PATH%;C:\cygwin\bin REM SHELL needed for any screen instances started from bash set SHELL=/bin/bash set HOME=C:\cygwin\home\Dragos set HOMEDRIVE=C: set HOMEPATH=\cygwin\home\Dragos REM

这是我的cygwin.bat文件,用于通过rxvt启动cygwin终端窗口

@echo off

C:

set PATH=%PATH%;C:\cygwin\bin

REM SHELL needed for any screen instances started from bash
set SHELL=/bin/bash
set HOME=C:\cygwin\home\Dragos
set HOMEDRIVE=C:
set HOMEPATH=\cygwin\home\Dragos

REM This part is for chere generated context menu item "Open Bash shell here"
REM 
if not [%1]==[] (
  C:\cygwin\bin\cygpath %1 > tmpFile
  set /p startingpath= < tmpFile
  del tmpFile
)

if "%startingpath%"=="" C:\cygwin\bin\rxvt --loginShell -sr
if not "%startingpath%"=="" start C:\cygwin\bin\rxvt --loginShell -e /bin/bash --login -c "cd '%startingpath%'; exec /bin/bash -rcfile ~/.bashrc"
exit
是的

man mintty 
但我所看到的是相当于rxvt的——mintty中的loginShell-e选项是——exec


是否有一种方法可以将我的首选登录shell(bash)和一些附加参数传递给mintty,就像我将它们传递给上面的rxvt一样?

下面是我的想法。我很想看看其他人的cygwin.bat

@echo off

C:

set PATH=%PATH%;C:\cygwin\bin

REM SHELL needed for any screen instances started from bash
set SHELL=/bin/bash
set HOME=C:\cygwin\home\Dragos
set HOMEDRIVE=C:
set HOMEPATH=\cygwin\home\Dragos

REM 

if not [%1]==[] (
  C:\cygwin\bin\cygpath %1 > tmpFile
  set /p startingpath= < tmpFile
  del tmpFile
)

if "%startingpath%"=="" start C:\cygwin\bin\mintty.exe --icon /Cygwin-Terminal.ico --size 140,50 --exec /bin/bash --login -c "exec /bin/bash -rcfile ~/.bashrc"
if not "%startingpath%"=="" start C:\cygwin\bin\mintty.exe --icon /Cygwin-Terminal.ico --size 140,50 --exec /bin/bash --login -c "cd '%startingpath%'; exec /bin/bash -rcfile ~/.bashrc"
exit
@echo关闭
C:
设置路径=%PATH%;C:\cygwin\bin
从bash启动的任何屏幕实例都需要REM SHELL
set SHELL=/bin/bash
set HOME=C:\cygwin\HOME\Dragos
设置HOMEDRIVE=C:
设置HOMEPATH=\cygwin\home\Dragos
雷姆
如果不是[%1]=[](
C:\cygwin\bin\cygpath%1>tmpFile
设置/p启动路径=
从rxvt切换到mintty的一个很好的优点是,您可以在从术语窗口选择文本的同时按Alt键进行列选择。
@echo off

C:

set PATH=%PATH%;C:\cygwin\bin

REM SHELL needed for any screen instances started from bash
set SHELL=/bin/bash
set HOME=C:\cygwin\home\Dragos
set HOMEDRIVE=C:
set HOMEPATH=\cygwin\home\Dragos

REM 

if not [%1]==[] (
  C:\cygwin\bin\cygpath %1 > tmpFile
  set /p startingpath= < tmpFile
  del tmpFile
)

if "%startingpath%"=="" start C:\cygwin\bin\mintty.exe --icon /Cygwin-Terminal.ico --size 140,50 --exec /bin/bash --login -c "exec /bin/bash -rcfile ~/.bashrc"
if not "%startingpath%"=="" start C:\cygwin\bin\mintty.exe --icon /Cygwin-Terminal.ico --size 140,50 --exec /bin/bash --login -c "cd '%startingpath%'; exec /bin/bash -rcfile ~/.bashrc"
exit