diff --git a/re.sh b/re.sh index 9308616..c3536e3 100755 --- a/re.sh +++ b/re.sh @@ -142,6 +142,12 @@ venvs() { list_venv "${venv}" deactivate ;; + "relate") + absolute="$(readlink -f "${venv}/bin/python")" + prevenv="$(readlink -f "${venv}")" + relative=$(echo "${absolute}" | sed "s|${prevenv}|..|") + echo ln --force --symbolic "${relative}" "${venv}/bin/python" + ;; *) ;; esac done @@ -162,6 +168,7 @@ venvs create deactivate venvs init +venvs relate venvs link venvs install venvs list