-
Notifications
You must be signed in to change notification settings - Fork 2
/
.bash_aliases
50 lines (38 loc) · 1.38 KB
/
.bash_aliases
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
if type xclip >/dev/null 2>&1 && [ -n "$DISPLAY" ]; then
XCLIP_IN="xclip -i";
XCLIP_OUT="xclip -o";
elif type pbcopy >/dev/null 2>&1; then
XCLIP_IN="pbcopy";
XCLIP_OUT="pbpaste";
else
unset XCLIP_IN
unset XCLIP_OUT
fi
alias urlquote='python3 -c "import urllib.parse, sys; _in = (sys.argv[1] if len(sys.argv) > 1 else input()); print(urllib.parse.quote(_in))"'
alias pssh="ssh -o 'ProxyCommand /usr/bin/env nc -x localhost:5000 %h %p'"
alias pscp="scp -o 'ProxyCommand /usr/bin/env nc -x localhost:5000 %h %p'"
alias runwine="DYLD_FALLBACK_LIBRARY_PATH=/usr/X11/lib wine"
WHICH='/usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
ALIAS="alias | $WHICH"
if echo -n | $WHICH vim >/dev/null 2>&1; then
alias which="$ALIAS"
fi
alias x_register='echo $DISPLAY > ~/.xsession_var'
alias x_use='export DISPLAY=$(cat ~/.xsession_var)'
alias chat='ssh scyther -t tmux attach -t chat'
alias mv='/bin/mv -i'
alias cd..='cd ..'
alias gt='git'
if ls --color &>/dev/null ; then
alias ls="ls --color=auto -I '*.pyc'"
fi
alias mkdate="mkdir -v $(date +'%Y-%m-%d')"
alias ve='source ~/.virtualenv/bin/activate'
alias ve27='source ~/.virtualenv2.7/bin/activate'
# neovim adapters
alias vim=nvim
alias vimdiff="nvim -d"
alias view="nvim -R"
if [ -f ~/.tools/configs/machines/$(hostname -s).bash_aliases ]; then
. ~/.tools/configs/machines/$(hostname -s).bash_aliases
fi