imochoa / dotfiles

collection of the setting that I like as well as some scripts to automate the post-install setup process
MIT License
0 stars 0 forks source link

bashrc #51

Closed imochoa closed 4 years ago

imochoa commented 4 years ago

Get inspiration from https://github.com/nelstrom/dotfiles/blob/master/bashrc

# Bash customisations to be syncronised between machines.
export PS1='\[\e[1;34m\][\u@\h \W]\$\[\e[0m\] '

# History
export HISTCONTROL=erasedups    # when adding an item to history, delete itentical commands upstream
export HISTSIZE=10000       # save 10000 items in history
shopt -s histappend     # append history to ~\.bash_history when exiting shell

# Lazy aliases
alias l='ls -l'
alias la='ls -Al'
alias ..='cd ..'
alias tree='tree -C'
alias trls='tree -C | less -R'  # -C outputs colour, -R makes less understand color
alias mode='(set -o | grep emacs.*on >/dev/null 2>&1 && echo "emacs mode" || echo "vi mode")'