alex-environ/home/.bashrc

45 lines
1 KiB
Bash
Raw Normal View History

#Alex's global .bashrc
# If not running interactively, don't do anything else
[[ $- != *i* ]] && return
#SET PATH IN .BASH_PROFILE
2024-07-09 09:52:38 +00:00
# Set the shell's editor to vi mode
set -o vi
#don't put duplicate lines or lines beginning with a space into history
HISTCONTROL=ignoreboth
#append to the history file, don't overwrite it
shopt -s histappend
#set some max sizes for the history
HISTSIZE=1000
HISTFILESIZE=2000
#resize window each command
shopt -s checkwinsize
2023-05-09 11:23:07 +00:00
#some useful aliases
alias ls='ls --color=auto'
alias jprint='python3 -m json.tool'
alias sl='ls --color=auto'
alias vim='vim -p'
# Onepassword sudo stuff.
if [ -n "${sudo_pass_uuid}" ]
then
alias sudo='sudo -A'
fi
2022-12-19 14:28:48 +00:00
# Fix the horrible shell that poetry gives you.
if [ -n "$POETRY_ACTIVE" ]
then
export VIRTUAL_ENV_DISABLE_PROMPT=1
cwd=$(pwd)
export PS1="\[\033[48;5;27m\]${cwd##*/}\[$(tput sgr0)\] 🖋️📜 "
fi
2023-05-09 11:23:07 +00:00
# Exclude some folders from grep by default.
alias grep='grep --color=auto --exclude-dir=".mypy_cache" --exclude-dir=".git" --exclude-dir=".tox" --exclude-dir="__pycache__"'