2021-09-11 02:00:17 +00:00
|
|
|
# ~/.bashrc: executed by bash(1) for non-login shells.
|
|
|
|
# We source it in ~/.profile so that it is used for _all_ shells.
|
2011-06-25 17:37:31 +00:00
|
|
|
|
2021-09-11 02:00:17 +00:00
|
|
|
# Don't do anything if the shell isn't interactive
|
|
|
|
case $- in
|
|
|
|
*i*) ;;
|
|
|
|
*) return;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
# don't put duplicates or lines starting with a space in the history.
|
|
|
|
HISTCONTROL=ignoreboth
|
|
|
|
# store a long history
|
|
|
|
export HISTSIZE=1000000
|
|
|
|
export HISTFILESIZE=10000000
|
|
|
|
|
|
|
|
# append to the history file rather than overwriting it
|
|
|
|
shopt -s histappend
|
|
|
|
|
|
|
|
# check the window size after each command and, if necessary,
|
|
|
|
# update the values of LINES and COLUMNS.
|
|
|
|
shopt -s checkwinsize
|
|
|
|
|
|
|
|
# all my terminals support color so let's colorize this alllllll
|
|
|
|
PS1="\[\e[33m\][\t] \`if [[ \$? = '0' ]]; then echo \"\[\e[0;32m\]\"; else echo \"\[\e[0;31m\]\"; fi\`\u@\h\[\e[0m\]> "
|
|
|
|
# modify the title bar, too
|
|
|
|
PS1="\[\e]0;\u@\h: \w\a\]$PS1"
|
|
|
|
|
|
|
|
# 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'
|
2011-07-10 17:43:51 +00:00
|
|
|
fi
|
|
|
|
|
2022-05-21 14:24:14 +00:00
|
|
|
alias vim="nvim"
|
2022-05-06 15:07:31 +00:00
|
|
|
|
2021-09-11 02:00:17 +00:00
|
|
|
# enable programmable completion features
|
|
|
|
if ! shopt -oq posix; then
|
|
|
|
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
|
|
|
. /usr/share/bash-completion/bash_completion
|
|
|
|
elif [ -f /etc/bash_completion ]; then
|
|
|
|
. /etc/bash_completion
|
|
|
|
fi
|
|
|
|
fi
|
2021-09-11 22:04:27 +00:00
|
|
|
|
2022-09-10 12:17:35 +00:00
|
|
|
# set PATH so it includes user's private bin if it exists
|
|
|
|
if [ -d "$HOME/bin" ] ; then
|
|
|
|
PATH="$HOME/bin:$PATH"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# set PATH so it includes user's private bin if it exists
|
|
|
|
if [ -d "$HOME/.local/bin" ] ; then
|
|
|
|
PATH="$HOME/.local/bin:$PATH"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -d "/usr/local/go/bin" ] ; then
|
|
|
|
PATH=$PATH:/usr/local/go/bin
|
|
|
|
fi
|
|
|
|
|
2021-09-11 22:04:27 +00:00
|
|
|
# Add rustup and the standard rust tooling to the path
|
|
|
|
. "$HOME/.cargo/env"
|