From 0ba4b9bd52f38e5be0493064ab1cf7889d5a03c7 Mon Sep 17 00:00:00 2001 From: Hektor Misplon Date: Tue, 7 Apr 2020 20:24:30 +0000 Subject: [PATCH] Add bash config w/ aliases --- .aliasrc | 20 ++++++++++++++++++++ .bashrc | 17 +++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 .aliasrc create mode 100644 .bashrc diff --git a/.aliasrc b/.aliasrc new file mode 100644 index 0000000..3bd2687 --- /dev/null +++ b/.aliasrc @@ -0,0 +1,20 @@ +alias bashrc="vim ~/.bashrc" +alias aliasrc="vim ~/.aliasrc" + +alias ls="ls --color=auto" +alias grep="grep --color=auto" + +alias l='ls -lh' +alias la='ls -lha' + +alias lgrep='l . | grep' +alias lagrep='la . | grep' + +alias vi='vim' +alias py='python' +alias cfg='/usr/bin/git --git-dir=/home/h/.cfg/ --work-tree=/home/h' +alias now='date "+%I:%M %a %d %b"' +alias brt='xbacklight -set' +alias bat='cat /sys/class/power_supply/BAT0/capacity' + + diff --git a/.bashrc b/.bashrc new file mode 100644 index 0000000..95eca41 --- /dev/null +++ b/.bashrc @@ -0,0 +1,17 @@ +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +# load aliases dynamically +[ -f "$HOME/.aliasrc" ] && source "$HOME/.aliasrc" + +PS1='\u@\h \W\$ ' + +# nvm +source /usr/share/nvm/init-nvm.sh + +# auto cd on path +shopt -s autocd + +# history +export HISTCONTROL=ignoreboth +