updated bash config

This commit is contained in:
2024-06-20 01:04:48 +10:00
parent 6e7ebb6ed7
commit 59c0ceab96

63
.bashrc
View File

@@ -1,6 +1,3 @@
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
@@ -9,24 +6,16 @@ case $- in
esac
# 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
# 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)"
@@ -40,16 +29,10 @@ case "$TERM" in
xterm-color|*-256color) color_prompt=yes;;
esac
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
@@ -72,30 +55,8 @@ xterm*|rxvt*)
;;
esac
# 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
# colored GCC warnings and errors
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
# some more ls aliases
#alias ll='ls -l'
#alias la='ls -A'
#alias l='ls -CF'
# 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.
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
@@ -112,30 +73,8 @@ if ! shopt -oq posix; then
fi
fi
# Created by `pipx` on 2024-06-09 11:53:58
export PATH="$PATH:/home/locke/.local/bin"
# Add Neovim to PATH and alias vi and vim to nvim
export PATH="$PATH:/opt/nvim-linux64/bin"
alias vim=nvim
alias vi=nvim
# Any new shell sessions (including incoming ssh sessions) will
# automatically start a new tmux session, or attach to an existing one
# Adapted from https://unix.stackexchange.com/a/113768/347104
#if [ -n "$PS1" ] && [ -z "$TMUX" ]; then
# # Adapted from https://unix.stackexchange.com/a/176885/347104
# # Create session 'main' or attach to 'main' if already exists.
# tmux new-session -A -s main
#fi
# add brew to PATH
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
# add fzf to path
eval "$(fzf --bash)"
export PATH=$PATH:/home/locke/.spicetify
export PATH="$PATH:$HOME/scripts"
alias dotfiles='/usr/bin/git --git-dir=/home/locke/.dotfiles --work-tree=/home/locke'