Skip to content

Commit

Permalink
Fix shell envs for fnm and pyenv (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
EnriqueVidal authored Mar 8, 2023
1 parent 2850ede commit 3847916
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
6 changes: 5 additions & 1 deletion .config/posix-shell/environments
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ PYENV_PATH=`which pyenv`
QT5CT_PATH=`which qt5ct`

if [[ -x $FNM_PATH ]]; then
eval "$(fnm env)"
eval "$(fnm env --use-on-cd)"
fi

if [[ -x $HOME/.pyenv ]]; then
eval "$(pyenv init -)"
fi

if [[ -f $GHCUP_ENV ]]; then
Expand Down
21 changes: 12 additions & 9 deletions .config/posix-shell/paths
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
# Access rbenv if installed
if [[ -f $HOME/.rbenv ]]; then
if [[ -d $HOME/.rbenv ]]; then
TMP_PATH=$HOME/.rbenv/bin:$TMP_PATH
fi

# Access fnm if installed
if [[ -f $HOME/.fnm ]]; then
TMP_PATH=$HOME/.fnm:$TMP_PATH
# Setup PYENV_ROOT if pyenv is installed
if [[ -d $HOME/.pyenv ]]; then
PYENV_ROOT=$HOME/.pyenv
TMP_PATH=$PYENV_ROOT/bin:$TMP_PATH

export PYENV_ROOT
fi

# Access pyenv if installed
if [[ -f $HOME/.pyenv ]]; then
TMP_PATH=$HOME/.pyenv/bin:$TMP_PATH
# Access fnm if installed
if [[ -d $HOME/.fnm ]]; then
TMP_PATH=$HOME/.fnm:$TMP_PATH
fi

# Access Android SDK
Expand All @@ -23,12 +26,12 @@ if [[ -f ANDROID_SDK_ROOT ]]; then
fi

# Access go binaries if installed
if [[ -f /usr/local/go ]]; then
if [[ -d /usr/local/go ]]; then
TMP_PATH=/usr/local/go/bin:$TMP_PATH
fi

# Access rust binaries if any
if [[ -f $HOME/.cargo ]]; then
if [[ -d $HOME/.cargo ]]; then
TMP_PATH=$HOME/.cargo/env:$TMP_PATH
TMP_PATH=$HOME/.cargo/bin:$TMP_PATH
fi
Expand Down

0 comments on commit 3847916

Please sign in to comment.