diff --git a/bashrc b/bashrc index de3ca26..11270c8 100644 --- a/bashrc +++ b/bashrc @@ -1,9 +1,37 @@ -#!/usr/bin/env bash -# Best bashrc in history +#!/usr/bin/env bash # Best bashrc in history # # Author: Shane Peters +# +# Alternate Paths +# +[[ -d ~/Bin ]] && export PATH=~/Bin:$PATH # local binaries & scripts +[[ -d ~/Bin/streams ]] && export PATH=~/Bin/streams:$PATH # radio streams +[[ -d /usr/local/cuda/bin ]] && export PATH=/usr/local/cuda-11.8/bin:$PATH +[[ -d /opt/node/node/bin ]] && export PATH=/opt/node/node/bin:$PATH # local binaries & scripts +[[ -d /opt/zeek/bin ]] && export PATH=/opt/zeek/bin:$PATH +[[ -d ~/.local/bin ]] && export PATH=~/bin:~/.local/bin:$PATH +[[ -d ~/.cargo/bin ]] && export PATH=~/.cargo/bin:$PATH + +# +# App env variables +# +export EDITOR='vim' +export LANG=en_US.utf8 +export HISTIGNORE="&:[ ]*:ls:ls -a:cd:cd .." # leave commands out of history log +export HISTCONTROL='ignoredups' +export HISTSIZE=5000 +export HISTFILESIZE=5000 +export PAGER='less' +export TZ='America/New_York' +export VISUAL=$EDITOR +export VAULT_TOKEN=root +export VAULT_ADDR=http://127.0.0.1:8200 +[[ -x /usr/bin/lesspipe ]] && eval "$(SHELL=/bin/sh lesspipe)" # less more friendly for non-text + +# # SSH agent +# SSH_ENV="$HOME/.ssh/agent-environment" start_agent() { /usr/bin/ssh-agent | sed 's/^echo/#echo/' >"$SSH_ENV" @@ -21,32 +49,6 @@ else start_agent fi -# -# Alternate Paths -# -[[ -d ~/Bin ]] && export PATH=~/Bin:$PATH # local binaries & scripts -[[ -d ~/Bin/streams ]] && export PATH=~/Bin/streams:$PATH # radio streams -[[ -d /usr/local/cuda/bin ]] && export PATH=/usr/local/cuda-11.8/bin:$PATH -[[ -d /opt/node/node/bin ]] && export PATH=/opt/node/node/bin:$PATH # local binaries & scripts -[[ -d /opt/zeek/bin ]] && export PATH=/opt/zeek/bin:$PATH -[[ -d ~/.local/bin ]] && export PATH=~/bin:~/.local/bin:$PATH -[[ -d ~/.cargo/bin ]] && export PATH=~/.cargo/bin:$PATH - -# -# App env variables -# -export EDITOR='vim' -export HISTIGNORE="&:[ ]*:ls:ls -a:cd:cd .." # leave commands out of history log -export HISTCONTROL='ignoredups' -export HISTSIZE=5000 -export HISTFILESIZE=5000 -export PAGER='less' -export TZ='America/New_York' -export VAULT_TOKEN=root -export VAULT_ADDR=http://127.0.0.1:8200 -export LANG=en_US.utf8 -export VISUAL=$EDITOR -[[ -x /usr/bin/lesspipe ]] && eval "$(SHELL=/bin/sh lesspipe)" # less more friendly for non-text # # bash options @@ -58,7 +60,7 @@ shopt -s nocaseglob # case-insensitive pathname expansion shopt -s autocd # enter directory without cd shopt -s cdspell # correct minor errors in directory names with cd shopt -s dirspell # attempt spelling correction on directory names in completion -#shopt -s dotglob # includes filenames beginning with a `.' in filename expansion +shopt -s dotglob # includes filenames beginning with a `.' in filename expansion shopt -s histappend # append to history file, instead of overwriting it shopt -s no_empty_cmd_completion # not attempt to search for possible completions on an empty line. shopt -s globstar # recursive globbing with ** @@ -73,14 +75,12 @@ stty -ixon # disable ^S/^Q flow control if [[ "$OSTYPE" == "darwin"* ]] || [[ "$OSTYPE" == "sun"* ]] ; then # BSD/macOS export LS_COLORS='ExGxbEaECxxEhEhBaDaCaD' - echo "BSD/macOS detected: LS_COLORS set for BSD/macOS." else # Linux - export LS_COLORS='di=34:ln=36:su=31;47:sg=35;47' - echo "Linux detected: LS_COLORS set for Linux." + export LS_COLORS='di=36:ln=35:su=31;47:sg=35;47' fi -export GREP_COLOR='1;36' +export GREP_COLOR='mt=1;36' export LESS="-R" # less colored output export LESS_TERMCAP_mb=$'\E[01;31m' # begin blinking export LESS_TERMCAP_md=$'\E[01;38;5;74m' # begin bold