Open the Cygwin command in the specified directory in the windows

I use phpstorm and terminal.

In the terminal section, I typed F:\Projects\cygwin64\bin\mintty.exe -i /Cygwin-Terminal.ico - , so it uses Cygwin as a terminal. But he opens it in his home folder. Can I open it in another folder? Typing a team or doing something else.

Since I have a F: \ Projects \ Local folder in this folder, I have a tramp and I want to open phpstorm, open a terminal in php storm and just type vagran. I do not want to open cgywin again.

thanks

+6
source share
3 answers

If you just want to open Cygwin with Mintty in the project directory, you can run the command:

 F:\Projects\cygwin64\bin\mintty.exe /bin/env CHERE_INVOKING=1 /bin/bash -l 

This will automatically not switch to the home directory. For more information about this command, see https://code.google.com/p/mintty/wiki/Tips#Starting_in_a_particular_directory .

If you want to use the built-in terminal PhpStorm, you can change the Shell path in the terminal settings. Go to File > Settings... > Tools > Terminal . Replace the shell path F:\Projects\cygwin64\bin\env.exe CHERE_INVOKING=1 /bin/bash -l . You may need to restart PhpStorm after this change.

Note: it is assumed that your Cygwin root directory is F:\Projects\cygwin64\ .

+12
source

For the one described above, the path no longer works, as in PhpStorm v. 2016.3. The shell path must be enclosed in quotation marks.

 "C:\Users\MyUser\.babun\cygwin\bin\env.exe" CHERE_INVOKING=1 /bin/zsh.exe 
+2
source

For PhpStorm, which I use (v10.0.4) on Windows 10, I use this command:

 D:\tools\.babun\cygwin\bin\env.exe CHERE_INVOKING=1 /bin/bash.exe 

I use Babun which installs Cygwin in D:\tools\.babun\cygwin .

+1
source

Source: https://habr.com/ru/post/978275/


All Articles