From cb51da13e54f4161a40f3f53aedfd8f9d98724bd Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sat, 14 May 2016 16:34:06 -0400 Subject: [PATCH] add cargo binaries to PATH --- dotfiles/lib/shellenv.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/dotfiles/lib/shellenv.sh b/dotfiles/lib/shellenv.sh index c8479f5d..453a1451 100644 --- a/dotfiles/lib/shellenv.sh +++ b/dotfiles/lib/shellenv.sh @@ -1,4 +1,4 @@ -source ~/.lib/shellenv/functions.sh +. "$HOME/.lib/shellenv/functions.sh" command -v greadlink > /dev/null && alias readlink="greadlink" function _source_shellenv_files { @@ -8,7 +8,8 @@ function _source_shellenv_files { } function add_to_path { - local result=$($HOME/.lib/python/shell_path.py --include-assignment "$@") + local result + result=$($HOME/.lib/python/shell_path.py --include-assignment "$@") eval "$result" } @@ -20,7 +21,7 @@ function _setup_env { hash brew 2>/dev/null && add_to_path --before "$(brew --prefix coreutils)/libexec/gnubin" add_to_path "/usr/local/bin" - add_to_path $(python -c 'import sysconfig; print sysconfig.get_path("scripts")') --before + add_to_path "$(python -c 'import sysconfig; print sysconfig.get_path(\"scripts\")')" --before if is_osx; then export CFLAGS=-Qunused-arguments @@ -44,6 +45,7 @@ function _setup_env { add_to_path "$HOME/.lib/python" --after add_to_path "/usr/local/sbin" --after + add_to_path "$HOME/.cargo/bin" # Load RVM into a shell session *as a function* [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" @@ -76,7 +78,7 @@ function _setup_env { function _path_helper { export PATH_HELPER_RAN="$(date)" - eval `/usr/libexec/path_helper -s` + eval "$(/usr/libexec/path_helper -s)" } environment_variable_exists PATH_HELPER_RAN || _path_helper