Nix-Config/users/tsv/bash_profile

53 lines
1.4 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
LC_ALL="en_GB.UTF-8"
# 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 de="devenv"
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"
alias tpdf="termpdf.py"
alias tn="tmux new-window -n"
alias genpdf="pandoc -o migration.pdf -t ms"
# 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