X-Git-Url: https://code.kerkeslager.com/?a=blobdiff_plain;f=.bashrc;h=f0ab9cf8ded172a05960b50a31026ef230b07cea;hb=71706a3fff1263af76aea550ede6992e7a85200c;hp=116567e14d1d9901600989941cce0b0271fc75d9;hpb=940c04349e64a17a7c7b4877c6e4db56d673a1d2;p=dotfiles diff --git a/.bashrc b/.bashrc index 116567e..f0ab9cf 100644 --- a/.bashrc +++ b/.bashrc @@ -1,7 +1,10 @@ # ~/.bashrc: executed by bash(1) for non-login shells. # If not running interactively, don't do anything -[ -z "$PS1" ] && return +case $- in + *i*) ;; + *) return;; +esac # don't put duplicate lines in the history. See bash(1) for more options # don't overwrite GNU Midnight Commander's setting of `ignorespace'. @@ -24,6 +27,11 @@ shopt -s checkwinsize # set the prompt PS1='\w\$ ' +# set variable identifying the chroot you work in (used in the prompt below) +if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then + debian_chroot=$(cat /etc/debian_chroot) +fi + # enable color support of ls and also add handy aliases if [ -x /usr/bin/dircolors ]; then eval "`dircolors -b`" @@ -114,11 +122,9 @@ on_prompt() { fi } +# Set vi keybindings set -o vi # Call on_prompt() every time the command prompt executes PROMPT_COMMAND=on_prompt -export NVM_DIR="/Users/david/.nvm" -[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm -