Usefull tips

1. I needed to join Cygwin and Total Commander in a way that on given source location I can open Cygwin by pressing one button. The solution turned out to be nontrivial.

You need to add

C:\cygwin\bin\bash.exe
to command and 
--login -i -c "cd \"%P\\\\";bash"
to parameters. The trick is %P contains path to source with \ at the end. But in this context \ is special character that must be escaped. But it must be escaped once because we are in -c, and twice because we are in cd “…”. So in facat we need %P\\\. With 3 backslashes because one is already in %P

KOMENTARZE (1)

  1. Michał Stanisław Wójcik2012-11-14 09:57:00

    Wait, that explanation couldn’t be right. %P includes backslashes anyway!

    But in fact \”%P\” doesn’t work at all, and the line mentioned in the above text works fine. So what is the reason?

  2. Podgląd live
    Nie opublikowałeś jeszcze tego komentarza! Aby opublikować naciśnij przycisk Opublikuj Komentarz.

Dodaj komentarz