How can I associate .sh files with Cygwin?

前端 未结 13 1398
旧时难觅i
旧时难觅i 2021-01-29 21:32

I\'d like to run a long rsync command in Cygwin by double clicking on a .sh file in Windows. It must start in the file\'s containing directory (e.g. /cygdrive/c/scripts/) so th

13条回答
  •  心在旅途
    2021-01-29 22:02

    One solution that works is to create a .bat file that will open cygwin and execute your script.

    The script to execute the script go.sh located on my home directory:

    @echo off
    
    C:
    chdir C:\cygwin\bin
    
    bash --login -i ./go.sh
    

提交回复
热议问题