projects
/
dotfiles-public.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5191c9f
)
.bash_profile: Add ~/.gem/*/bin to the PATH (if they exist)
author
W. Trevor King
<wking@tremily.us>
Thu, 20 Mar 2014 00:17:09 +0000
(17:17 -0700)
committer
W. Trevor King
<wking@tremily.us>
Thu, 20 Mar 2014 00:21:10 +0000
(17:21 -0700)
This allows you to automatically run Ruby gems without tweaking your
PATH.
src/.bash_profile
patch
|
blob
|
history
diff --git
a/src/.bash_profile
b/src/.bash_profile
index a60b37daae7da89c8c1f329c7c1e475a9697226f..2fa9feeaa3dfa709f2b9e8e7383943fd10438aa0 100644
(file)
--- a/
src/.bash_profile
+++ b/
src/.bash_profile
@@
-3,6
+3,13
@@
# 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}"