From bd53f34595ad2983b8ea49cd4b17feb9a570e4b1 Mon Sep 17 00:00:00 2001 From: Bryan Shell Date: Sat, 3 Oct 2015 10:52:20 -0500 Subject: [PATCH] Add local evalulation for sh- commands This solves #1, as the command(s) were still just echoing the settings to stdout instead of evaluating then in the local shell. --- libexec/nodenv-init | 49 +++++++++++++++++++++++ libexec/nodenv-sh-rehash | 23 +++++++++++ libexec/{nodenv-shell => nodenv-sh-shell} | 0 3 files changed, 72 insertions(+) create mode 100755 libexec/nodenv-sh-rehash rename libexec/{nodenv-shell => nodenv-sh-shell} (100%) diff --git a/libexec/nodenv-init b/libexec/nodenv-init index 19dfcc2..fb54efb 100755 --- a/libexec/nodenv-init +++ b/libexec/nodenv-init @@ -99,3 +99,52 @@ is_fish && { echo 'export PATH="'${NODENV_ROOT}'/shims:${PATH}"' echo 'nodenv rehash 2>/dev/null' } + +commands=(`nodenv-commands --sh`) +case "$shell" in +fish ) + cat </dev/null || true" + ;; +esac diff --git a/libexec/nodenv-shell b/libexec/nodenv-sh-shell similarity index 100% rename from libexec/nodenv-shell rename to libexec/nodenv-sh-shell