Skip to content
  • Herbert Valerio Riedel's avatar
    42aad283
    Fix bad '... \\' escape in ghcversion.h generation · 42aad283
    Herbert Valerio Riedel authored
    Today I learned about the peculiarities of escaping within
    single-quotes:
    
    Turns out,
    
      echo 'foo \\'
    
    emits
    
      foo \\
    
    rather than escaping the '\'. Curiously, if you need to escape a '
    within single-quotes, here's how to do it
    
      echo 'foo '\'' bar'
    
    which will emit
    
      foo ' bar
    
    This fixes #10002
    
    (cherry picked from commit 1289048e)
    42aad283
    Fix bad '... \\' escape in ghcversion.h generation
    Herbert Valerio Riedel authored
    Today I learned about the peculiarities of escaping within
    single-quotes:
    
    Turns out,
    
      echo 'foo \\'
    
    emits
    
      foo \\
    
    rather than escaping the '\'. Curiously, if you need to escape a '
    within single-quotes, here's how to do it
    
      echo 'foo '\'' bar'
    
    which will emit
    
      foo ' bar
    
    This fixes #10002
    
    (cherry picked from commit 1289048e)
Loading