Provide for arbitrary scripts to be executed upon entering an exiting a topic.
$ be in myproject hero modeling
Entering "myproject"..
$ exit
Exiting "myproject"..
implementation
At the moment, the script: portion of be.yaml does exactly this for enter, but there is no exit. Another question is whether to run the given commands via the command-line, or Python. The benefit of command-line is full integration with the newly entered environment, whereas Python would effectively run in the parent process that first launches the subshell and therefore not have access to the same environment.
However the shell language will vary across OSs, meaning be.yaml would not be fully cross-platform, which may make things tricky in multi-platform productions.
Due to the many possibilities of how and when and which language, the initial version should probably require a high level of specificity that will eventually phase off into generic terms as their usage levels out and a commonality found.
goal
Provide for arbitrary scripts to be executed upon entering an exiting a topic.
implementation
At the moment, the
script:
portion ofbe.yaml
does exactly this forenter
, but there is noexit
. Another question is whether to run the given commands via the command-line, or Python. The benefit of command-line is full integration with the newly entered environment, whereas Python would effectively run in the parent process that first launches the subshell and therefore not have access to the same environment.However the shell language will vary across OSs, meaning
be.yaml
would not be fully cross-platform, which may make things tricky in multi-platform productions.scope
The second question to consider is where execution is to take place.
One option is to allow for each.
specificity
Due to the many possibilities of how and when and which language, the initial version should probably require a high level of specificity that will eventually phase off into generic terms as their usage levels out and a commonality found.