-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc
53 lines (42 loc) · 1.31 KB
/
.bashrc
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
45
46
47
48
49
setEnvVar(){
PATH=~/bin:$PATH
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
}
setTerminalParametere(){
set -o vi
if [ -f /usr/share/bash-completion/bash_completion ];then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ];then
. /etc/bash_completion
fi
}
setKeyMap(){
#syntax bind 'parameter'
bind '",,":"\e"'
bind '"\C-a": beginning-of-line'
bind '"\C-l": clear-screen'
}
syncfile(){
(nohup rsync -azzv /mnt/d/'OneDrive - kolo'/桌面/pdf教程 root@fashion:/var/www/ 1>/dev/null 2>&1 & )
(nohup rsync -azzv /mnt/d/'OneDrive - kolo'/桌面/同步笔记 root@fashion:/var/www/ 1>/dev/null 2>&1 & )
}
getfile(){
#rsync -azzv root@fashion:/var/www /mnt/d/'OneDrive - kolo'/桌面/File
rsync -azzv root@fashion:/var/www/同步笔记 /mnt/d/'OneDrive - kolo'/桌面/File
rsync -azzv root@fashion:/var/www/pdf教程 /mnt/d/'OneDrive - kolo'/桌面/File
}
setAlias(){
alias ls='ls --color'
alias grep='grep --color'
alias 'rmc'='rm *.class'
alias 'e'='ls -l'
alias sip="grep -E '\<\<(([0-9]|[1-9][0-9]|1[0-9][0-9]|2([0-4][0-9]|5[0-4]))\>\.){3}(\<[0-9]|[1-9][0-9]|1[0-9][0-9]|2([0-4][0-9]|5[0-4])\>)\>'"
}
main(){
setTerminalParametere
setEnvVar
setKeyMap
setAlias
syncfile
}
main