@@ -46,9 +46,9 @@ if "%CMDER_ROOT:~-1%" == "\" SET "CMDER_ROOT=%CMDER_ROOT:~0,-1%"
46
46
47
47
:: Include Cmder libraries
48
48
call "%cmder_root%\vendor\bin\cexec.cmd" /setpath
49
+
call "%cmder_root%\vendor\lib\lib_console"
49
50
call "%cmder_root%\vendor\lib\lib_base"
50
51
call "%cmder_root%\vendor\lib\lib_path"
51
-
call "%cmder_root%\vendor\lib\lib_console"
52
52
call "%cmder_root%\vendor\lib\lib_git"
53
53
call "%cmder_root%\vendor\lib\lib_profile"
54
54
@@ -89,7 +89,7 @@ call "%cmder_root%\vendor\lib\lib_profile"
89
89
set "GIT_INSTALL_ROOT=%~2"
90
90
shift
91
91
) else (
92
-
%print_error% "The Git install root folder "%~2", you specified does not exist!"
92
+
%print_error% "The Git install root folder "%~2" that you specified does not exist!"
93
93
exit /b
94
94
)
95
95
) else if /i "%1" == "/nix_tools" (
@@ -111,7 +111,7 @@ call "%cmder_root%\vendor\lib\lib_profile"
111
111
set "HOME=%~2"
112
112
shift
113
113
) else (
114
-
%print_error% The home folder "%2", you specified does not exist!
114
+
%print_error% The home folder "%2" that you specified does not exist!
115
115
exit /b
116
116
)
117
117
) else if /i "%1" == "/svn_ssh" (
@@ -124,6 +124,13 @@ call "%cmder_root%\vendor\lib\lib_profile"
124
124
goto :var_loop
125
125
126
126
:start
127
+
:: Enable console related methods if verbose/debug is turned on
128
+
if %debug_output% gtr 0 (set print_debug=%lib_console% debug_output)
129
+
if %verbose_output% gtr 0 (
130
+
set print_verbose=%lib_console% verbose_output
131
+
set print_warning=%lib_console% show_warning
132
+
)
133
+
127
134
:: Sets CMDER_SHELL, CMDER_CLINK, CMDER_ALIASES variables
128
135
%lib_base% cmder_shell
129
136
%print_debug% init.bat "Env Var - CMDER_ROOT=%CMDER_ROOT%"
@@ -140,13 +147,22 @@ if defined CMDER_USER_CONFIG (
140
147
set CMDER_CONFIG_DIR=%CMDER_USER_CONFIG%
141
148
)
142
149
150
+
if not "%CMDER_SHELL%" == "cmd" (
151
+
%print_warning% "Incompatible 'ComSpec/Shell' Detetected: %CMDER_SHELL%"
152
+
set CMDER_CLINK=0
153
+
set CMDER_ALIASES=0
154
+
)
155
+
143
156
:: Pick right version of Clink
144
157
if "%PROCESSOR_ARCHITECTURE%"=="x86" (
145
158
set clink_architecture=x86
146
159
set architecture_bits=32
147
-
) else (
160
+
) else if "%PROCESSOR_ARCHITECTURE%"=="AMD64" (
148
161
set clink_architecture=x64
149
162
set architecture_bits=64
163
+
) else (
164
+
%print_warning% "Incompatible Processor Detetected: %PROCESSOR_ARCHITECTURE%"
165
+
set CMDER_CLINK=0
150
166
)
151
167
152
168
if "%CMDER_CLINK%" == "1" (
@@ -182,10 +198,18 @@ if "%CMDER_CLINK%" == "1" (
182
198
"%CMDER_ROOT%\vendor\clink\clink_%clink_architecture%.exe" inject --quiet --profile "%CMDER_CONFIG_DIR%" --scripts "%CMDER_ROOT%\vendor"
183
199
184
200
if errorlevel 1 (
185
-
%print_error% "Failed to initialize Clink with error code: %errorlevel%"
201
+
%print_error% "Clink initilization has failed with error code: %errorlevel%"
186
202
)
187
203
) else (
188
-
%print_verbose% "WARNING: Incompatible 'ComSpec/Shell' Detetected, Skipping Clink Injection!"
204
+
%print_warning% "Skipping Clink Injection!"
205
+
206
+
for /f "tokens=2 delims=:." %%x in ('chcp') do set cp=%%x
207
+
chcp 65001>nul
208
+
209
+
:: Revert back to plain cmd.exe prompt without clink
210
+
prompt $E[1;32;49m$P$S$_$E[1;30;49mλ$S$E[0m
211
+
212
+
chcp %cp%>nul
189
213
)
190
214
191
215
if "%CMDER_CONFIGURED%" GTR "1" (
@@ -265,7 +289,7 @@ goto :CONFIGURE_GIT
265
289
:: Add git to the path
266
290
if exist "%GIT_INSTALL_ROOT%\cmd\git.exe" %lib_path% enhance_path "%GIT_INSTALL_ROOT%\cmd" ""
267
291
268
-
:: Add the unix commands at the end to not shadow windows commands like more and find
292
+
:: Add the unix commands at the end to not shadow windows commands like `more` and `find`
269
293
if %nix_tools% equ 1 (
270
294
%print_verbose% "Preferring Windows commands"
271
295
set "path_position=append"
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4