.bashrc.d/20nobeep: Fallback to -blength if --blength doesn't work
[dotfiles-public.git] / src / .bash_profile
index b946370ebfd380858abc2534f42443c049e06b4b..2fa9feeaa3dfa709f2b9e8e7383943fd10438aa0 100644 (file)
@@ -1,8 +1,23 @@
 # This file is sourced by bash for login shells.
 
-# set PATH so it includes user's private bin if it exists
-if [ -d ~/bin ]; then
-    PATH=~/bin:"${PATH}":/usr/sbin:/sbin
+# include system binaries
+PATH="${PATH}":/usr/sbin:/sbin
+
+# set PATH so it includes ruby gems, if they exist
+for GEM_BIN in ~/.gem/ruby/*/bin; do
+       if [ -d "${GEM_BIN}" ]; then
+               PATH="${GEM_BIN}":"${PATH}"
+       fi
+done
+
+# set PATH so it includes user's local bin if it exists
+if [ -d "${HOME}"/.local/bin ]; then
+       PATH="${HOME}"/.local/bin:"${PATH}"
+fi
+
+# set PATH so it includes user's personal bin if it exists
+if [ -d "${HOME}"/bin ]; then
+       PATH="${HOME}"/bin:"${PATH}"
 fi
 
 # The following line runs your .bashrc and is recommended by the bash
@@ -13,7 +28,7 @@ fi
 
 # print my calendar if I've configured it
 # http://bsdcalendar.sourceforge.net/  (Gentoo: app-misc/calendar)
-CALENDAR=$(which calendar 2> /dev/null)
+CALENDAR=$(command -v calendar)
 if [ -n "${CALENDAR}" ] && [ -f ~/.calendar/calendar ]; then
-    calendar
+       calendar
 fi