-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.aliasrc
executable file
·53 lines (42 loc) · 1.33 KB
/
.aliasrc
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
50
51
52
53
#!/usr/bin/env bash
# git alias
alias glog="git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
# proxy config
export https_proxy="http://127.0.0.1:7890"
export http_proxy="http://127.0.0.1:7890"
export all_proxy="socks5://127.0.0.1:7891"
alias proxy="export https_proxy=http://127.0.0.1:7890;export http_proxy=http://127.0.0.1:7890;export all_proxy=socks5://127.0.0.1:7891;"
alias unproxy="unset http_proxy;unset https_proxy;unset all_proxy;"
# ip function
alias ipcn="curl myip.ipip.net"
alias ip="curl ip.sb"
alias v='vim'
alias ll='ls -alh'
alias la='ls -A'
alias l='ls -CF'
# add -v will stdout result
alias mkdir='mkdir -v'
alias mv='mv -v'
alias ln='ln -v'
# tmux alias
# sessions
alias tls='tmux ls'
alias tnew='tmux new -s'
alias tdet='tmux detach'
alias tatt='tmux attach -t'
alias tkill='tmux kill-session -t'
# python pip
alias pip="python -m pip"
# function
# git proxy
function git_proxy() {
git config --global http.proxy http://127.0.0.1:7890
git config --global https.proxy https://127.0.0.1:7890
}
function git_unproxy() {
git config --global --unset http.proxy
git config --global --unset https.proxy
}
# ssh connection local network
alias xuyanze="ssh [email protected] -p 22"
alias harmonia="ssh [email protected] -p 22"