Permalink
Browse files

Modified to be in line with Ubuntu Precise 12.04

  • Loading branch information...
gerhard committed Feb 7, 2013
1 parent 3a4e880 commit bde19e995233ae2dc19660b9e5ffde3f3b161eff
Showing with 19 additions and 5 deletions.
  1. +19 −5 files/default/bashrc
View
@@ -1,9 +1,12 @@
+# THIS FILE HAS BEEN GENERATED BY CHEF
+# ANY MANUAL MODIFICATIONS WILL BE OVERWRITTEN
+#
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
-# don't put duplicate lines in the history. See bash(1) for more options
-# ... or force ignoredups and ignorespace
-HISTCONTROL=ignoredups:ignorespace
+# don't put duplicate lines or lines starting with space in the history.
+# See bash(1) for more options
+HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it
shopt -s histappend
@@ -16,6 +19,10 @@ HISTFILESIZE=2000
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
+# If set, the pattern "**" used in a pathname expansion context will
+# match all files and zero or more directories and subdirectories.
+#shopt -s globstar
+
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
@@ -45,8 +52,8 @@ if [ -n "$force_color_prompt" ]; then
fi
fi
-# If ubuntu user exists, we're running on EC2
-if [[ $(id ubuntu 2>&1) =~ "uid" ]]; then
+# If the AWS instance-data IP resolves, we are inside AWS
+if [[ $(host 169.254.169.254) =~ "instance-data" ]]; then
SERVER_ID="::$(curl -s http://169.254.169.254/latest/meta-data/instance-id)"
elif [[ $(id vagrant 2>&1) =~ "uid" ]]; then
SERVER_ID="::vagrant"
@@ -89,3 +96,10 @@ fi
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
+
+# enable programmable completion features (you don't need to enable
+# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
+# sources /etc/bash.bashrc).
+if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
+ . /etc/bash_completion
+fi

0 comments on commit bde19e9

Please sign in to comment.