Updates when moving spiderweb WSL to spider WSL.

This commit is contained in:
2025-01-21 14:11:09 -08:00
parent 436baf3241
commit bd99935f03
10 changed files with 116 additions and 113 deletions

100
.bashrc
View File

@@ -2,19 +2,34 @@
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
## If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
## Bash Configuration
# 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)"
# 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
## Setup Prompt
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
@@ -48,6 +63,7 @@ else
fi
unset color_prompt force_color_prompt
## Set title if xterm
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
@@ -57,72 +73,18 @@ 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 -alF'
alias la='ls -A'
alias l='ls -CF'
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
# 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
## Begin .rc.d stuff
## Homebrew
# Consider moving this to a .rc.d script.
# If Apple Silicon Homebrew is installed activate it.
if [ -x "/usr/local/homebrew/bin/brew" ]; then
eval "$(/usr/local/homebrew/bin/brew shellenv)"
# If x86_64 Homebrew is installed alias it to brew86.
if [ -x "/opt/homebrew/bin/brew" ]; then
alias brew86='arch -x86_64 /usr/local/homebrew/bin/brew'
fi
fi
# If x86_64 Homebrew is installed activate it.
if [ -x "/opt/homebrew/bin/brew" ]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
# If Apple Silicon Homebrew is installed alias it to brewarm.
if [ -x "/usr/local/homebrew/bin/brew" ]; then
alias brewarm='arch -arm64 /opt/homebrew/bin/brew'
fi
fi
## Source all scripts in ~/.rc.d
for f in ~/.rc.d/*.sh; do
source "$f"
done
## Autocompletion
# 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).
# sources /etc/bash.bashrc). This is after .rc.d stuff because that may have changed the available completions.
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
@@ -133,19 +95,15 @@ fi
## Functions
## Configure History
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
## Paths
# append to the history file, don't overwrite it
shopt -s histappend
# Append personal bin to path
# if [ -d "$HOME/bin" ] ; then
# PATH="$HOME/bin:$PATH"
# fi
# 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
# Append local personal bin to path
# if [ -d "$HOME/.local/bin" ] ; then
# PATH="$HOME/.local/bin:$PATH"
# fi