Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 14 additions & 17 deletions activate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -282,24 +282,21 @@ autoenv_leave() {
\command -v chdir >/dev/null 2>&1 && \chdir "${from_dir}" || \builtin cd "${from_dir}"
_hadone=''
while [ "$PWD" != "" ] && [ "$PWD" != "/" ]; do
case $to_dir/ in
$PWD/*)
\break
;;
*)
_file="$PWD/${AUTOENV_ENV_LEAVE_FILENAME}"
if [ -f "${_file}" ]; then
if [ -z "${_hadone}" ]; then
\printf %s "${_file}"
_hadone='1'
else
\printf %s "
if [ "$to_dir/" = "$PWD/" ]; then
\break
fi

_file="$PWD/${AUTOENV_ENV_LEAVE_FILENAME}"
if [ -f "${_file}" ]; then
if [ -z "${_hadone}" ]; then
\printf %s "${_file}"
_hadone='1'
else
\printf %s "
${_file}"
fi
fi
\command -v chdir >/dev/null 2>&1 && \chdir "$(\pwd)/.." || \builtin cd "$PWD/.."
;;
esac
fi
fi
__autoenv_cd "$PWD/.."
done
)

Expand Down
Loading