-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbashrc
More file actions
42 lines (35 loc) · 949 Bytes
/
bashrc
File metadata and controls
42 lines (35 loc) · 949 Bytes
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
[ -f ~/.aliases ] && . ~/.aliases
umask 0002
export NETRC=/home/jlaing/.netrc
export EDITOR=/usr/bin/vim
alias tmux="tmux -2"
export TERM="screen-256color"
eval `dircolors ~/.colors/dircolors-solarized/dircolors.256dark`
tmirr() {
tmux has-session -t "$1" || return
for i in $(seq 1 9); do
newsess="$1-mirr$i"
tmux has-session -t "$newsess" 2> /dev/null
if [ $? -eq 1 ]; then
tmux new-session -s "$newsess" -t "$1"
return
fi
done
echo "all mirrors already exist"
return 1
}
sqld() {
if [ $# -lt 2 ]; then
echo "usage: sqld <file> <table> [db args]"
return 1;
fi
local FILE="$1"; shift
local TABLE="$1"; shift
local COLS="$(head -1 $FILE | sed 's/\./_/g')"
psql $* -c "copy $TABLE ($COLS) from stdin with csv header" < $FILE
}
## todo
alias t='~/dotfiles/bin/todo.txt-cli/todo.sh'
source ~/dotfiles/bin/todo.txt-cli/todo_completion
## local
[ -f ~/.bashrc.local ] && . ~/.bashrc.local