-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmybashrc
40 lines (30 loc) · 933 Bytes
/
mybashrc
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
export LANG="en_US.UTF-8"
# simple PS1 indicator
PS1='\[\033[01;32m\]\u \[\033[01;34m\]\w\[\033[00m\] \$ '
# bash into vim mode
set -o vi
# history configuration
export HISTTIMEFORMAT='%F %T '
export HISTCONTROL=ignoreboth:erasedups
export HISTSIZE=100000
export HISTFILESIZE=100000
# asdf
if [ -f $HOME/.asdf/asdf.sh ]; then
source $HOME/.asdf/asdf.sh
source $HOME/.asdf/completions/asdf.bash
fi
# git completion
if [ -f $HOME/go/src/github.com/git/git/contrib/completion/git-completion.bash ]; then
source $HOME/go/src/github.com/git/git/contrib/completion/git-completion.bash
fi
alias gst='git status'
alias ls='ls --color'
chq() {
cd "$(ghq list -p | fzf)"
}
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
# GITHUB_TOKEN from gh config file
if [ -f ~/.config/gh/hosts.yml ]; then
export GITHUB_TOKEN=`cat ~/.config/gh/hosts.yml | grep oauth_token | cut -d':' -f2 | cut -b 2-`
fi
PATH="$HOME/bin:$HOME/go/bin:$PATH"