-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc
100 lines (77 loc) · 2.63 KB
/
.bashrc
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
export PATH=$PATH:$HOME/opt/
if [ -f ~/.secrets/bw_session ] && [ -n $BW_SESSION ]; then
export BW_SESSION=$(cat ~/.secrets/bw_session)
fi
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
git_info() {
branch=$(git branch --show-current 2> /dev/null)
if [[ $? -eq 0 ]]; then
if [[ -d ".git" ]]; then
printf "(GIT:%s) " "$branch"
elif [[ -e ".git" ]]; then
gitcontents=$(cat .git)
if [[ $gitcontents == 'gitdir: ./.bare' ]]; then
printf "(GIT:BARE) "
else
printf "(GIT:%s) " "$branch"
fi
else
printf "(GIT:%s) " "$branch"
fi
fi
}
bang() {
echo -n -e "\a"
}
if [[ -e "$HOME/.dotnetsuggest" ]]; then
source "$HOME/.dotnetsuggest"
fi
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# my stuff
alias vi=nvim
alias vim=nvim
alias tm=tmux-go
# alias pacman='sudo pacman'
alias bwgo=". ~/opt/bwgo"
alias gs="git status"
alias gd="git diff"
alias gr="cd \$(git rev-parse --show-toplevel)"
alias gl="git log --oneline"
alias gls="git log --oneline -n 30"
alias pyv=". \$(fzf-py-venv)"
alias ccat="bat -pp"
alias protontricks='flatpak run com.github.Matoking.protontricks'
alias protontricks-launch='flatpak run --command=protontricks-launch com.github.Matoking.protontricks'
alias pretty_csv="sed 's/,/ ,/g' | column -t -s,"
alias fucking="sudo"
export EDITOR=nvim
export GOOGLE_APPLICATION_CREDENTIALS=/home/anna/.config/gcloud/application_default_credentials.json
eval `keychain --quiet --eval`
export PS1="\[$(tput setaf 10)\]\u@$HOSTNAME \[$(tput setaf 11)\][\W] \[$(tput setaf 9)\]\$(git_info)\[$(tput sgr0)\]-> "
. "$HOME/.cargo/env"
eval "$(direnv hook bash)"