dotfiles/.bashrc
2023-02-03 23:25:38 -05:00

65 lines
1.6 KiB
Bash

# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# history settings
HISTSIZE=5000
HISTFILESIZE=10000
shopt -s histappend
PROMPT_COMMAND="history -a; $PROMPT_COMMAND"
export HISTCONTROL=erasedups
# 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
# automatically prepend cd when entering just a path in the shell
shopt -s autocd
# set a fancy prompt (non-color, unless we know we "want" color)
export TERM=xterm-color
# Alias definitions.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH:$HOME/.local/bin"
fi
# source fzf script for interactive use
if [ -f ~/git/dotfiles/.bash_fzf ] ; then
. ~/git/dotfiles/.bash_fzf
fi
# source headscale autocompletion script
if [ -f ~/.autoheadscale ] ; then
. ~/.autoheadscale
fi
# set prompt colors and style
if [ -f ~/.PS1 ] ; then
source ~/.PS1
else
PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]$ '
fi
# get function to see available colors for PS1
if [ -f ~/git/dotfiles/.colors ] ; then
. ~/git/dotfiles/.colors
fi
# fetch uninstalled package names when attempting command (arch only)
if [ -f /usr/share/doc/pkgfile/command-not-found.bash ] ; then
source /usr/share/doc/pkgfile/command-not-found.bash
fi