Account for upstream separating the completion and prompt scripts
[msysgit.git] / bin / msys-rxvt.bat
blobc5e377260f83f8a62c6dab1d7b4559cf05fd622d
1 @echo off\r
2 rem Copyright (C):  2001, 2002  Earnie Boyd\r
3 rem   mailto:earnie@users.sf.net\r
4 rem This file is part of Minimal SYStem\r
5 rem   http://www.mingw.org/msys.shtml\r
6 rem\r
7 rem File:           msys.bat\r
8 rem Revision:       2.0\r
9 rem Revision Date:  April 17th, 2002\r
11 rem ember to set the "Start in:" field of the shortcut.\r
12 rem A value similar to C:\msys\1.0\bin is what the "Start in:" field needs\r
13 rem to represent.\r
15 rem ember value of GOTO: is used to know recursion has happened.\r
16 if "%1" == "GOTO:" goto %2\r
18 rem ember command.com only uses the first eight characters of the label.\r
19 goto _WindowsNT\r
21 rem ember that we only execute here if we are in command.com.\r
22 :_Windows\r
24 if "x%COMSPEC%" == "x" set COMSPEC=command.com\r
25 start %COMSPEC% /e:4096 /c %0 GOTO: _Resume %0 %1 %2 %3 %4 %5 %6 %7 %8 %9\r
26 goto EOF\r
28 rem ember that we execute here if we recursed.\r
29 :_Resume\r
30 for %%F in (1 2 3) do shift\r
32 rem ember that we get here even in command.com.\r
33 :_WindowsNT\r
35 if "x%MSYSTEM%" == "x" set MSYSTEM=MINGW32\r
36 if "%1" == "MSYS" set MSYSTEM=MSYS\r
38 if NOT "x%DISPLAY%" == "x" set DISPLAY=\r
40 if EXIST bin\nul cd bin\r
41 if EXIST rxvt.exe goto startrxvt\r
42 if EXIST sh.exe goto startsh\r
44 echo Cannot find the rxvt.exe or sh.exe binary -- aborting.\r
45 pause\r
46 exit 1\r
48 rem If you don't want to use rxvt then rename the file rxvt.exe to something\r
49 rem else.  Then sh.exe will be used instead.\r
50 :startrxvt\r
52 rem Setup the default colors for rxvt.\r
53 if "x%MSYSBGCOLOR%" == "x" set MSYSBGCOLOR=White\r
54 if "x%MSYSFGCOLOR%" == "x" set MSYSFGCOLOR=Black\r
55 if "x%MINGW32BGCOLOR%" == "x" set MINGW32BGCOLOR=LightYellow\r
56 if "x%MINGW32FGCOLOR%" == "x" set MINGW32FGCOLOR=Navy\r
57 if "%MSYSTEM%" == "MSYS" set BGCOLOR=%MSYSBGCOLOR%\r
58 if "%MSYSTEM%" == "MSYS" set FGCOLOR=%MSYSFGCOLOR%\r
59 if "%MSYSTEM%" == "MINGW32" set BGCOLOR=%MINGW32BGCOLOR%\r
60 if "%MSYSTEM%" == "MINGW32" set FGCOLOR=%MINGW32FGCOLOR%\r
62 start rxvt -backspacekey \b -sl 2500 -fg %FGCOLOR% -bg %BGCOLOR% -sr -fn Courier-12 -tn msys -geometry 80x25 -e /bin/sh --login -i\r
63 exit\r
65 :startsh\r
66 start sh --login -i\r
67 exit\r
69 :EOF\r
71 rem ChangeLog:\r
72 rem 2002.03.07  Earnie Boyd  mailto:earnie@users.sf.net\r
73 rem     * Move the @echo off to the top.\r
74 rem     * Change the binmode setting to nobinmode.\r
75 rem     * Remove the angle brackets around email address to workaround MS \r
76 rem     buggy command processor.\r
77 rem\r
78 rem 2002.03.12  Earnie Boyd  mailto:earnie@users.sf.net\r
79 rem     * Add filter logic to find rxvt.exe\r
80 rem\r
81 rem 2002.03.13  Earnie Boyd  mailto:earnie@users.sf.net\r
82 rem     * Revert the nobinmode change.\r
83 rem\r
84 rem 2002.03.20  Earnie Boyd  mailto:earnie@users.sf.net\r
85 rem     * Add logic for stating bash.\r
86 rem\r
87 rem 2002.04.11  Earnie Boyd  mailto;earnie@users.sf.net\r
88 rem     * Add logic for setting MSYSTEM value based on parameter.\r
89 rem\r
90 rem 2002.04.15  Olivier Gautherot  mailto:olivier_gautherot@mentorg.com\r
91 rem     * Reduce number test conditions for finding an executable.\r
92 rem\r
93 rem 2002.04.15  Earnie Boyd  mailto:earnie@users.sf.net\r
94 rem     * Unset DISPLAY if set before starting shell.\r
95 rem\r
96 rem 2002.04.16  Earnie Boyd  mailto:earnie@users.sf.net\r
97 rem     * Remove use of DEFINED in conditional statments for variables for\r
98 rem     command.com support.\r
99 rem     * Add check for nonexistance of USERNAME variable for Win9x support.\r
100 rem\r
101 rem 2002.04.17  Earnie Boyd  mailto:earnie@users.sf.net\r
102 rem     * Add foreground and background color defaults based on MSYSTEM value.\r
103 rem\r
104 rem 2002.04.22  Earnie Boyd  mailto:earnie@users.sf.net\r
105 rem     * More Win 9x changes.\r
106 rem\r
107 rem 2002.05.04  Earnie Boyd  mailto:earnie@users.sf.net\r
108 rem     * Remove the SET of USERNAME and HOME.\r
109 rem\r
110 rem 2002.11.18  Earnie Boyd  mailto:earnie@users.sf.net\r
111 rem     * Add command.com detection and restart with a larger environment to\r
112 rem     avoid errors on w9x.\r
113 rem     Many thanks to Randy W. Sims mailto:RandyS@ThePierianSpring.org.\r
114 rem     See Randy's response to "RE: [Mingw-msys] Installation on WindowsME" \r
115 rem     from 11/06/2002 in the archives of mingw-msys@lists.sf.net.\r
116 rem\r
117 rem 2002.11.19  Paul Garceau  mailto:pgarceau@attbi.com\r
118 rem     * Fix a typo: Change COMPSPEC to COMSPEC.\r
119 rem\r
120 rem 2002.11.25  Earnie Boyd  mailto:earnie@users.sf.net\r
121 rem     * Remove the SET CYGWIN since it doesn't matter any longer.\r
122 rem\r
123 rem 2003.02.03  Earnie Boyd  mailto:earnie@users.sf.net\r
124 rem     * Win9x doesn't like ``EXISTS dir'' so change it to ``EXISTS dir\nul''.\r
125 rem     Thanks to Nicolas Weber mailto:nicolasweber@gmx.de.\r
126 rem\r
127 rem 2003.03.06  Earnie Boyd  mailto:earnie@users.sf.net\r
128 rem     * Add -backspacekey switch to rxvt startup.\r
129 rem     * Move RXVT color setup to startrxvt label\r
130 rem\r
131 rem 2004.01.30  Earnie Boyd  mailto:earnie@users.sf.net\r
132 rem     * Add -geometry parameter to work around an off by one issue with\r
133 rem       the default values.\r
134 rem     Thanks to Dave Schuyler mailto:parameter@users.sf.net\r