anchor.diff:  
   :ConEmuEnd
   
  -REM ###########################################################################
  -REM ###                             DOSKEY                                  ###
  -REM ###########################################################################
  +@REM ##########################################################################
  +@REM ###                            DOSKEY                                  ###
  +@REM ##########################################################################
   
   WHERE /Q "doskey.exe"
   IF ERRORLEVEL 1 (
       GOTO DosKeySkip
   )
   
  -REM Because I'm tired of forgetting this is not a *nix shell
  +@REM Because I'm tired of forgetting this is not a *nix shell
   IF DEFINED SetupEnvVerbose ECHO * [DOSKEY] Configuring ...
   DOSKEY clear=cls $*
   DOSKEY ls=dir $*
  
positive.code: @ECHO OFF
  
  REM ###########################################################################
  REM ###                         Pre-init Checks                             ###
  REM ###########################################################################
  
  REM The intent here is to avoid running our environment setup script when CMD
  REM is not being launched interactively. There's a couple of reasons why this
  REM is desirable. One is potentially causing issues with automated invocations
  REM due to the environment changes we make. Another is performance, as this
  REM script may launch a dozen or more processes throughout its processing.
  
  REM Bail-out: MSBuild & Visual Studio
  REM Performance impact & may cause unexpected behaviour
  IF DEFINED MSBuildExtensionsPath EXIT /B
  IF DEFINED VisualStudioVersion EXIT /B
  
  REM Bail-out: MinGW & MSYS
  REM In some scenarios our script doesn't execute correctly
  IF DEFINED MSYSTEM EXIT /B
  
  REM Bail-out: Cygwin Setup
  REM Environment changes on autorebase cause DOSKEY to crash
  IF DEFINED CYGWINROOT EXIT /B
  
  REM Remove any double quotes from the command line that was passed to CMD, as
  REM they are likely to cause problems with subsequent string comparisons.
  REM
  REM The assignment of CMDCMDLINE to _CMDCMDLINE before then assigning the
  REM result of the string substitution is deliberate. For example, running:
  REM
  REM SET _CMDCMDLINE=%%CMDCMDLINE:"=%%
  REM
  REM Will result in *both* CMDCMDLINE and _CMDCMDLINE now having the result of
  REM the string substitution, despite there being no assignment to CMDCMDLINE.
  REM This is in contrast to how every other variable behaves.
  SET _CMDCMDLINE=%CMDCMDLINE%
  SET _CMDCMDLINE=%_CMDCMDLINE:"=%
  
  REM Also remove any spaces for the same reason of causing problems with the
  REM string comparisons. This also has the benefit of removing trailing spaces.
  SET _CMDCMDLINE=%_CMDCMDLINE: =%
  
  REM The goal here is to only proceed if the command line provided to CMD ends
  REM with the CMD executable itself. This implies it's probably being called for
  REM interactive usage, rather than to run a batch script or program.
  REM
  REM FindStr would be better here as it can do a regular expression test, but it
  REM means launching a separate process, which we're trying to avoid.
  IF /I [%_CMDCMDLINE%] == [cmd] GOTO Init
  IF /I [%_CMDCMDLINE%] == [cmd.exe] GOTO Init
  IF /I [%_CMDCMDLINE:~-12%] == [System32\cmd] GOTO Init
  
negative.code: 
  :ClinkEnd
  
  @REM ##########################################################################
  @REM ###                            ANSICON                                 ###
  @REM ##########################################################################
  
  @REM ConEmu provides its own ANSI support
  IF DEFINED ConEmuANSI GOTO AnsiConEnd
  
  WHERE /Q "ansicon.exe"
  