You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm enthusiastic about Sauce, having struggled with similar needs for long myself. I came up with some unreleased code, which allows me to cover a subset of what Sauce currently offers.
One feature I find it useful, is the ability to execute commands whenever I start working on a project, and whenever I stop working on it.
It'd be great if Sauce could feature this, especially with it's cascading loading capabilities !
FWIW, here's the gist of my Bash code that implements this:
I wrote sauce in rust precisely because I dont feel like I understand shell code well enough to write it in bash, so it's not entirely obvious to me what exactly you're doing above :p.
If I understand the gist of the request though, I'm likely into the idea of adding some sort of in-built ability to run arbitrary shell-code upon sauce (automatically on enter, with autoload=true), and once you've supported on-enter, on-exit probably also makes sense.
I have a simple/sample implementation of "on enter" functionality. This is very straightforward, and uses essentially identical semantics to normal cascade behavior.
It's when thinking about the "on exit" behavior that questions start coming up.
Should on-exit only run for the previous $PWD? Should it run for all parent directories? Should it only run for the diff between the prev/current pwd (~/foo/bar/baz -> ~/foo runs ~/foo/bar/baz then ~/foo/bar on-exit)?
It kind of seems like the last one is what one would expect, and would then follow that my impl of on-enter is flawed and should only run for the diff between the prev/current dirs also.
and the trap behavior for EXIT is probably a natural extension where the "current" set is empty and prev - current would thereby yield all dirs
I'm enthusiastic about Sauce, having struggled with similar needs for long myself. I came up with some unreleased code, which allows me to cover a subset of what Sauce currently offers.
One feature I find it useful, is the ability to execute commands whenever I start working on a project, and whenever I stop working on it.
It'd be great if Sauce could feature this, especially with it's cascading loading capabilities !
FWIW, here's the gist of my Bash code that implements this:
and my
stop_workspace_hook()
function consists in:The text was updated successfully, but these errors were encountered: