Skip to content

Source parent directory's .env.leave file when leaving subdirectory #236

Open
@chrysle

Description

@chrysle

First of all, thanks for this handy tool!

Is your feature request related to a problem? Please describe.

I have a directory containing multiple Git repositories and a .env file. Now, whenever I cd into one of these subdirectories, the parent's .env file is executed, as intended, and activates a virtual environment it searches in another directory. Now, in the same folder I configured a .env.leave file to deactivate such an environment once I leave it again. However, when I leave the folder, the .env.leave is not sourced – which I find a bit odd, considering that parental .env files are when entering.

Describe the solution you'd like

I'd like to have a .env.leave file executed whenever I leave a subdirectory of the directory where it is residing (and the same) – probably only depth 1, or to be configured.

Describe alternatives you've considered

Deactivating manually. It isn't a big deal, or copying a similar .env.leave file into each of my repositories – it would be slightly suboptimal though, for I'd have to tell Git to not bother about this "untracked change".

Additional context

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions