Auto Update

This commit is contained in:
matt1432 2023-02-03 23:21:16 -05:00
parent 9dbd6a9da5
commit 7958081547

48
.bashrc
View file

@ -2,21 +2,16 @@
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples # for examples
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) # history settings
HISTSIZE=5000 HISTSIZE=5000
HISTFILESIZE=10000 HISTFILESIZE=10000
shopt -s histappend shopt -s histappend
#export PROMPT_COMMAND="history -a"
PROMPT_COMMAND="history -a; $PROMPT_COMMAND" PROMPT_COMMAND="history -a; $PROMPT_COMMAND"
export HISTCONTROL=erasedups export HISTCONTROL=erasedups
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
# check the window size after each command and, if necessary, # check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS. # update the values of LINES and COLUMNS.
shopt -s checkwinsize shopt -s checkwinsize
@ -25,63 +20,42 @@ shopt -s checkwinsize
# match all files and zero or more directories and subdirectories. # match all files and zero or more directories and subdirectories.
shopt -s globstar 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) # set a fancy prompt (non-color, unless we know we "want" color)
export TERM=xterm-color export TERM=xterm-color
# 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. # 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 if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases . ~/.bash_aliases
fi 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 # set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH:$HOME/.local/bin" PATH="$HOME/bin:$PATH:$HOME/.local/bin"
fi fi
# source fzf script for interactive use
if [ -f ~/git/dotfiles/.bash_fzf ] ; then if [ -f ~/git/dotfiles/.bash_fzf ] ; then
. ~/git/dotfiles/.bash_fzf . ~/git/dotfiles/.bash_fzf
fi fi
# source headscale autocompletion script
if [ -f ~/.autoheadscale ] ; then if [ -f ~/.autoheadscale ] ; then
. ~/.autoheadscale . ~/.autoheadscale
fi fi
# set prompt colors and style
if [ -f ~/.PS1 ] ; then if [ -f ~/.PS1 ] ; then
source ~/.PS1 source ~/.PS1
else else
PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]$ ' PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]$ '
fi fi
# get function to see available colors for PS1
if [ -f ~/git/dotfiles/.colors ] ; then if [ -f ~/git/dotfiles/.colors ] ; then
. ~/git/dotfiles/.colors . ~/git/dotfiles/.colors
fi 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