-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zsh_cygwin
44 lines (41 loc) · 935 Bytes
/
.zsh_cygwin
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Exports
here="/cygdrive/c/Users/`whoami`"
mnt='/cygdrive'
# Aliases
alias .x="cd $mnt/x"
alias .c="cd $mnt/c"
alias .s="cd $mnt/s"
alias .p="cd $mnt/p"
alias wpwd='cygpath -w `pwd`'
alias ls='ls --color'
alias tldr='tldr -t base16'
alias root='Powershell -command "Start-Process -Verb RunAs wt" && exit'
alias there='cd $here'
alias rex='cmd /c "taskkill /f /im explorer.exe && explorer"; exit'
alias mwin='xwin -multiwindow &'
alias here='explorer .'
alias winpath='cygpath -w'
__cmd && cat() {
for file in "$@"; do
bat "$(cygpath -w "$file")"
done
}
netline_main() {
clear
x=.
ip=1.1.1.1
while [ $1 ]; do
if [ $1 != - ]; then ip=$1; shift
else
shift
x=$1
shift
fi
done
while :; do
ping -w 250 -n 1 $ip >&- && echo -ne "\e[0;1;32m$x\e[m" || ( ping -w 750 -n 1 $ip >&- && echo -ne "\e[0;1;33m$x\e[m" || echo -ne "\e[0;1;31m$x\e[m" )
done
}
netline() {
netline_main $@ &
}