Nix-Config/users/tsv/bash_profile

47 lines
1.2 KiB
Bash

PAGER="less -r"
EDITOR="nvim"
VISUAL="nvim"
PATH=$HOME/bin:$HOME/.my_config/bin:$PATH
shopt -s checkwinsize
XDG_STATE_HOME=$HOME/.state
# Sane defaults for history
HISTFILE=$XDG_STATE_HOME/.bash_history
HISTSIZE=10000
HISTFILESIZE=20000
HISTCONTROL=ignoredups:erasedups # Ubuntu default is ignoreboth
shopt -s histappend # In Ubuntu this is already set by default
PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND$'\n'}history -a; history -c; history -r"
shopt -s histappend
alias weather="curl wttr.in/~Isle+of+Wight"
alias pubip="curl -4 icanhazip.com"
alias less="less -r"
[[ -f ~/.LESS_TERMCAP ]] && . ~/.LESS_TERMCAP
alias checkport="sudo netstat -tnlp | grep"
alias dockerpurge="docker system prune --all --force --volumes"
alias dockerkill="docker stop `docker ps -a -q`"
alias vi="nvim"
alias tp="$HOME/bin/tmux_pair.bash"
# Prompt setup
GIT_PS1_SHOWDIRTYSTATE=1
GIT_PS1_SHOWSTASHSTATE=1
GIT_PS1_SHOWUNTRACKEDFILES=1
GIT_PS1_SHOWUPSTREAM="auto"
source ~/bin/git_prompt.sh
BLUE='\033[0;34m'
CLEAR='\033[0m'
CYAN='\033[0;36m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
BOLD='\033[01m'
PS1="\n\n[$GREEN\\]\h$CLEAR\\]] [$BLUE\\]\w$CLEAR\\]]"
PS1+=' $(__git_ps1 [$YELLOW%s$CLEAR]) \n'
PS1+="ॐ \[$BOLD\]"
trap 'printf "\033[0m" >&2' DEBUG