From 42da15c1fbff60c4a49705b96ebb30721ccafb14 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 2 Apr 2022 08:18:01 +0300 Subject: bash: best practices & linting --- %HOME%/.profile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to '%HOME%/.profile') diff --git a/%HOME%/.profile b/%HOME%/.profile index eb57441..5c25be3 100644 --- a/%HOME%/.profile +++ b/%HOME%/.profile @@ -58,7 +58,11 @@ chruby_setup() { chruby_setup rbenv_setup() { - command -v rbenv > /dev/null && eval "$( rbenv init - )" + local rbenv_init + + command -v rbenv > /dev/null && \ + rbenv_init="$( rbenv init - )" && \ + eval "$rbenv_init" } rbenv_setup @@ -83,7 +87,11 @@ python_setup python3 python [ -r "$HOME/.pythonrc" ] && export PYTHONSTARTUP="$HOME/.pythonrc" pyenv_setup() { - command -v pyenv > /dev/null && eval "$( pyenv init - )" + local pyenv_init + + command -v pyenv > /dev/null && \ + pyenv_init="$( pyenv init - )" && \ + eval "$pyenv_init" } pyenv_setup -- cgit v1.2.3