forked from ryanb/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbash_aliases
44 lines (30 loc) · 1.16 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
# alias sudo='sudo env PATH=$PATH'
uberg(){
foo="grep --color=always --exclude-dir=\\*.git\\* --exclude-dir=\\*spec/req_cache\\* --exclude-dir=\\*public/assets\\* --exclude-dir=\\*public/packs\\* --exclude-dir=\\*node_modules\\* --exclude-dir=\\*i18n\\* --exclude-dir=\\*.svn\\* --exclude-dir=\\*smarty_compiled\\* --exclude-dir=\\*log\\* --exclude=\\*min.js\\* --exclude=\\*cscope.out\\* --exclude=\\*tmp\\* -A2 -C2 -Rni \"$1\" ."
echo ${foo}
eval "${foo}"
res=$?
echo $1
return ${res}
}
alias vimswapclean='find . -name *.swp -name *.swo -name *.swn -exec rm -i '{}' \;'
alias gitpushcheck='git log --branches --not --remotes'
# alias passwords='gpg -d ~/.passwords.gpg'
psql(){
main="/Applications/Postgres.app/Contents/Versions/latest/bin/psql -p5432 $@"
eval "${main}"
res=$?
echo $1
}
alias tmux-pair='tmux attach-session -t pair'
alias sublime="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"
printcolumns(){
local __cols=$(tput cols)
echo $((__cols - 10))
}
# copy the third line of the pass into the clipboard
getpass(){
pass $1 | sed -n '3p' | pbcopy
}
alias python='eval $(which python3.10)'
alias pip='eval $(which pip3.10)'