dotfiles/modules/shell/files/base.sh

25 lines
620 B
Bash
Raw Normal View History

2017-02-26 20:36:31 +00:00
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
2016-11-19 22:04:40 +00:00
# bash aliases
alias refresh="cd $PWD > /dev/null"
alias c="clear"
alias e="exit"
alias no="yes n"
2017-11-17 09:06:17 +00:00
alias open="mimeopen"
alias browse "mimeopen ."
2016-11-19 22:04:40 +00:00
2016-11-19 22:10:01 +00:00
# colourify things!
2016-11-19 22:04:40 +00:00
alias ls='ls --color=auto'
alias grep='grep --color=auto'
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
2017-02-26 20:36:31 +00:00
# don't put duplicate lines or lines starting with space in the history.