-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbashrc
More file actions
97 lines (79 loc) · 2.18 KB
/
bashrc
File metadata and controls
97 lines (79 loc) · 2.18 KB
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
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# Emacs doom {{{
if [ -d "$HOME/.emacs.d" ]; then
export PATH="$HOME/.emacs.d/bin:$PATH"
fi
# }}}
# Mise
if command -v mise >/dev/null 2>&1; then
eval "$(mise activate zsh)"
fi
# Go
if [ -d "$HOME/go" ]; then
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$PATH
fi
export GO111MODULE=auto
# }}}
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# Color Bash Prompt
# inspired by the oh-my-zsh's gentoo
PS1='\[\e[1;32m\]\u@\h\[\e[m\]\[\e[1;34m\] \w \$ \[\e[0m\]'
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
# 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
# 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 dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# include .alias if it exists
if [ -f "$HOME/.alias" ]; then
. "$HOME/.alias"
fi
# include .bashrc.local if it exists
if [ -f "$HOME/.bashrc.local" ]; then
. "$HOME/.bashrc.local"
fi
# Alias definitions.
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias ga='git add'
alias gb='git branch'
alias gc='git commit'
alias gd='git diff'
alias gst='git status'
alias gco='git checkout'
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# User configuration
export SSH_KEY_PATH="~/.ssh/id_rsa"
export TERM=xterm-256color
export ALTERNATE_EDITOR=""
# Press Ctrl+D forty-two times before it actually quits the shell
export IGNOREEOF=42
# Preferred editor for local and remote sessions
if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='vim'
else
if which mvim >/dev/null; then
export EDITOR="mvim"
else
export EDITOR='vim'
fi
fi