File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 1+ # Force text files to have unix eols, so Windows/Cygwin does not break them
2+ * . * eol =lf
Original file line number Diff line number Diff line change @@ -21,6 +21,10 @@ is_osx() {
2121 [ " $platform " == " Darwin" ]
2222}
2323
24+ is_cygwin () {
25+ [[ " $( uname) " =~ CYGWIN ]]
26+ }
27+
2428get_editor_from_the_env_var () {
2529 if [ -z $EDITOR ]; then
2630 # $EDITOR not set, fallback
@@ -45,6 +49,8 @@ search_command_generator() {
4549generate_open_command () {
4650 if is_osx; then
4751 echo " $( command_generator " open" ) "
52+ elif is_cygwin; then
53+ echo " $( command_generator " cygstart" ) "
4854 elif command_exists " xdg-open" ; then
4955 echo " $( command_generator " xdg-open" ) "
5056 else
@@ -57,6 +63,8 @@ generate_open_search_command() {
5763 local engine=" $1 "
5864 if is_osx; then
5965 echo " $( search_command_generator " open" " $engine " ) "
66+ elif is_cygwin; then
67+ echo " $( command_generator " cygstart" ) "
6068 elif command_exists " xdg-open" ; then
6169 echo " $( search_command_generator " xdg-open" " $engine " ) "
6270 else
You can’t perform that action at this time.
0 commit comments