简体   繁体   中英

How do I execute a bash script on my Vagrant from PhpStorm on a Windows PC

I develop on a Windows PC with PhpStorm as my IDE and Vagrant as my local environment. Each time I change to a new Git branch in PhpStorm I manually execute a bash script that compiles my project for me.

I wish to execute this bash script without having to manually SSH into the box, locate and then execute the file.

Is it possible to do this directly from the PhpStorm interface? If 'Yes', how?

  1. PhpStorm has built-in SSH Terminal . You can log in into your remote host and keep it open all the time.

  2. PhpStorm also has Remote SSH External Tools . It's the same as External Tools but meant to work over SSH.

    • You can create new (or edit existing) SSH External Tools entry at Settings/Preferences | Tools | Remote SSH External Tools Settings/Preferences | Tools | Remote SSH External Tools Settings/Preferences | Tools | Remote SSH External Tools .

    • You can specify where this entry should be available (menus): Main menu ( Menu | Tools ), context menus for Editor, Project View panel and Search Results.

    • Once created, you can even assign custom shortcut to such entry at Settings/Preferences | Keymap Settings/Preferences | Keymap to most frequently used entries if so desired.

    More in official tutorial .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM