From 30541aca6b4740047ce42c440deff63a66c26f9d Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sun, 26 Feb 2017 20:36:31 +0000 Subject: [PATCH] Import useful things from bashrc --- bash/base.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/bash/base.sh b/bash/base.sh index d8ab0e0..bff9db7 100644 --- a/bash/base.sh +++ b/bash/base.sh @@ -1,3 +1,9 @@ +# If not running interactively, don't do anything +case $- in + *i*) ;; + *) return;; +esac + source $DOTFILES/bash/catfish.sh source $DOTFILES/bash/javascript.sh source $DOTFILES/bash/applications.sh @@ -5,6 +11,8 @@ source $DOTFILES/bash/applications.sh # Export some variables export ANDROID_HOME=/opt/android-sdk export EDITOR=/bin/nano +export TIMEFMT=$'\nreal\t%E\nuser\t%U\nsys\t%S' + # Extend path export PATH=${PATH}:${ANDROID_HOME}/tools @@ -20,11 +28,6 @@ alias e="exit" alias please="sudo" alias no="yes n" -# some more ls aliases -alias ll='ls -alF' -alias la='ls -A' -alias l='ls -CF' - # colourify things! alias ls='ls --color=auto' alias dir='dir --color=auto' @@ -36,3 +39,6 @@ alias egrep='egrep --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)" + +# don't put duplicate lines or lines starting with space in the history. +HISTCONTROL=ignoreboth