dotfiles/hm/scripts/.bsh/bashrc

54 lines
1.2 KiB
Bash
Raw Normal View History

#!/usr/bin/env bash
# Geoffrey's trimmed and condensed shell configuration file,
# with an healthy and safe dose of aliases and config.
# Can be embedded to any server
# Completion for existing commands
alias ls='ls -h --color=auto'
alias mkdir='mkdir -v'
alias cp="cp -i"
alias mv="mv -iv"
alias free='free -h'
alias df='df -h'
# Advanced completions
# (not busybox compatible)
alias cp="cp -i --reflink=auto"
alias grep="grep --color=auto"
alias dd='dd status=progress'
alias rm='rm -v --one-file-system'
alias free='free -m'
alias diff='diff --color=auto'
alias dmesg='dmesg --ctime'
# Frequent mistakes
alias sl=ls
alias al=la
alias mdkir=mkdir
alias systemclt=systemctl
alias please=sudo
# Shortcuts for commonly used commands
alias ll="ls -l"
alias la="ls -la"
# alias s='sudo -s -E'
# Bash options
shopt -s expand_aliases
shopt -s histappend
HISTCONTROL=ignoreboth:erasedups
# Program configuration
export TIME_STYLE='+%Y-%m-%d %H:%M:%S'
export LESS=-R
export LESS_TERMCAP_mb=$'\E[1;31m'
export LESS_TERMCAP_md=$'\E[1;36m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_so=$'\E[01;44;33m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_us=$'\E[1;32m'
export LESS_TERMCAP_ue=$'\E[0m'