Last active
February 26, 2021 13:03
-
-
Save yorickdewid/6a3bcdd02383c4a942e8 to your computer and use it in GitHub Desktop.
Custom Bash shell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# $HOME/.bashrc FILE for bash-3.0 (or later) | |
# | |
# By Yorick de Wid | |
# First revision Aug. 2006 | |
# | |
# Usage: source $HOME/.bashrc | |
# If not running interactively, don't do anything | |
[ -z "$PS1" ] && return | |
# Bash options | |
shopt -s checkwinsize | |
shopt -s cdspell | |
shopt -s checkhash | |
shopt -s sourcepath | |
# Disable options: | |
shopt -u mailwarn | |
unset MAILCHECK | |
# Default editor | |
export EDITOR=nano | |
# Default pager | |
export PAGER=less | |
# Add local bin path | |
export PATH=$PATH:.local/bin | |
# Default colors | |
DEFAULT_COLOR="[00m" | |
if [ `id -u` == '0' ]; then | |
USER_COLOR=$COLOR_RED | |
else | |
USER_COLOR=$COLOR_PINK | |
fi | |
# Baseprompt | |
export PS1="\[\e[01;37m\][\[\e[0m\]\[\e[01;33m\]\u\[\e[0m\]\[\e[00;37m\]@\[\e[0m\]\[\e[01;36m\]\h\[\e[0m\]\[\e[00;37m\]:\[\e[0m\]\[\e[00;31m\]\$?\[\e[0m\]\[\e[00;37m\]:\[\e[0m\]\[\e[00;32m\]\w\[\e[0m\]\[\e[01;37m\]]\[\e[0m\]\[\e[00;37m\]\\$ \[\e[0m\]" | |
# History (HISTSIZE maximum saves in 1 session) | |
export HISTTIMEFORMAT='%F %T ' | |
export HISTSIZE=2000 | |
export HISTFILESIZE=2000 | |
export HISTCONTROL=ignoredups | |
# History, eternal | |
PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND ; }"'echo $$ $USER \ | |
"$(history 1)" >> ~/.bash_eternal_history' | |
# GPG key | |
export GPG_TTY=$(tty) | |
# Aliases | |
alias ls='ls --color=auto --format=long' | |
alias la='ls -Ash' | |
alias l='ls -lh' | |
alias ll='ls -lh' | |
alias lla='ls -lAsh' | |
alias watch='watch --color' | |
# PostgreSQL connection settings | |
#export PGHOST= | |
#export PGPORT=5432 | |
#export PGDATABASE=postgres | |
#export PGUSER= | |
#export PGPASSWORD= |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment