I use phpstorm and it's terminal facility.
In terminal section I typed F:\Projects\cygwin64\bin\mintty.exe -i /Cygwin-Terminal.ico -
so it uses Cygwin as terminal. But it opens it in home folder. Is it possible to open it in different folder? By typing a command or by doing something else.
Because I have a folder called F:\Projects\Local in this folder I have vagrant and I want to open phpstorm, open terminal within php storm and just type vagran up. I don't want to open cgywin again.
thanks
You are now able to open cygwin in specific directory with a Right mouse click in Windows Explorer (Context Menu) and select "Bash Prompt Here". You can also open cygwin from a specific directory using windows command prompt: This command will open cygwin with current directory taken from command prompt.
All Windows users on your system should have a home directory with a Windows path of: c:\cygwin\home\[Windows Username] To find out what your home directory name is type the 'pwd' (i.e. print working directory) command in a newly opened Cygwin Console.
For example, if you need to create a file in the following Cygwin directory: and click 'File>New>Text Document' in Windows Explorer to create an empty file. Then use Windows Wordpad to edit it, by doubling-clicking the new file, and selecting WordPad from the 'Open With ...' selection window.
Add Cygwin Path to Windows Environment Variable. After the installation you will have a Cygwin icon on your desktop that you can launch to open the Cygwin terminal. This terminal starts in the C:Cygwinhome<user> folder but that isn’t particularly useful because you probably don’t have any files stored there.
If you just want to open Cygwin with Mintty in the project directory then you can execute the command:
F:\Projects\cygwin64\bin\mintty.exe /bin/env CHERE_INVOKING=1 /bin/bash -l
This will avoid automatically changing to the home directory. See https://code.google.com/p/mintty/wiki/Tips#Starting_in_a_particular_directory for more information on this command.
If you want to use the embedded PhpStorm terminal, then you can modify the Shell path in the terminal settings. Open File > Settings... > Tools > Terminal
. Replace the shell path with F:\Projects\cygwin64\bin\env.exe CHERE_INVOKING=1 /bin/bash -l
. You may need to restart PhpStorm after this change.
Note: this is assuming that your Cygwin Root Directory is F:\Projects\cygwin64\
.
For whome the above way ain't work anymore, like in PhpStorm v. 2016.3. The shell path have to be enclosed in quotes
"C:\Users\MyUser\.babun\cygwin\bin\env.exe" CHERE_INVOKING=1 /bin/zsh.exe
For the PhpStorm that I'am using (v10.0.4) in Windows 10 I use this command works:
D:\tools\.babun\cygwin\bin\env.exe CHERE_INVOKING=1 /bin/bash.exe
I'm using Babun which installs the Cygwin in D:\tools\.babun\cygwin
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With