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() {
21
21
[ " $platform " == " Darwin" ]
22
22
}
23
23
24
+ is_cygwin () {
25
+ [[ " $( uname) " =~ CYGWIN ]]
26
+ }
27
+
24
28
get_editor_from_the_env_var () {
25
29
if [ -z $EDITOR ]; then
26
30
# $EDITOR not set, fallback
@@ -45,6 +49,8 @@ search_command_generator() {
45
49
generate_open_command () {
46
50
if is_osx; then
47
51
echo " $( command_generator " open" ) "
52
+ elif is_cygwin; then
53
+ echo " $( command_generator " cygstart" ) "
48
54
elif command_exists " xdg-open" ; then
49
55
echo " $( command_generator " xdg-open" ) "
50
56
else
@@ -57,6 +63,8 @@ generate_open_search_command() {
57
63
local engine=" $1 "
58
64
if is_osx; then
59
65
echo " $( search_command_generator " open" " $engine " ) "
66
+ elif is_cygwin; then
67
+ echo " $( command_generator " cygstart" ) "
60
68
elif command_exists " xdg-open" ; then
61
69
echo " $( search_command_generator " xdg-open" " $engine " ) "
62
70
else
You can’t perform that action at this time.
0 commit comments