File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,10 @@ is_osx() {
20
20
[ $( uname) == " Darwin" ]
21
21
}
22
22
23
+ is_cygwin () {
24
+ [[ $( uname) == CYGWIN ]]
25
+ }
26
+
23
27
online_icon_default () {
24
28
if is_osx; then
25
29
echo " $online_icon_osx "
@@ -42,9 +46,14 @@ online_status() {
42
46
else
43
47
local timeout_flag=" -w"
44
48
fi
49
+ if is_cygwin; then
50
+ local number_pings_flag=" -n"
51
+ else
52
+ local number_pings_flag=" -c"
53
+ fi
45
54
local ping_timeout=" $( get_tmux_option " $ping_timeout_string " " $ping_timeout_default " ) "
46
55
local ping_route=" $( get_tmux_option " $route_to_ping_string " " $route_to_ping_default " ) "
47
- ping -c 1 " $timeout_flag " " $ping_timeout " " $ping_route " > /dev/null 2>&1
56
+ ping " $number_pings_flag " 1 " $timeout_flag " " $ping_timeout " " $ping_route " > /dev/null 2>&1
48
57
}
49
58
50
59
print_icon () {
You can’t perform that action at this time.
0 commit comments