dotfiles/.bashrc

85 lines
2.3 KiB
Bash
Raw Normal View History

2022-12-17 00:37:53 -05:00
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
2023-02-01 01:12:30 -05:00
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=5000
HISTFILESIZE=10000
shopt -s histappend
export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
2022-12-17 00:37:53 -05:00
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
shopt -s globstar
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# set a fancy prompt (non-color, unless we know we "want" color)
2022-12-27 19:12:25 -05:00
export TERM=xterm-color
2022-12-17 00:37:53 -05:00
# 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 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
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
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
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
2023-01-07 02:51:06 -05:00
PATH="$HOME/bin:$PATH:$HOME/.local/bin"
2022-12-17 00:37:53 -05:00
fi
if [ -f ~/.bash-fzfrc ] ; then
. ~/.bash-fzfrc
2022-12-28 15:38:02 -05:00
fi
2023-01-08 01:30:58 -05:00
if [ -f ~/.autoheadscale ] ; then
. ~/.autoheadscale
fi
2023-01-22 14:03:26 -05:00
2023-01-22 14:23:01 -05:00
if [ -f ~/.PS1 ] ; then
source ~/.PS1
2023-01-22 14:03:26 -05:00
else
PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]$ '
fi
2023-01-23 08:45:00 -05:00
2023-01-23 15:09:01 -05:00
if [ -f ~/git/dotfiles/.colors ] ; then
. ~/git/dotfiles/.colors
2023-01-23 08:45:00 -05:00
fi
2023-02-01 01:12:30 -05:00