New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Making plushook
a bare command (modifying $PATH, take 2)
#66
Comments
Not that this is entirely material to this consideration, but this assertion should be backed up with the output from a |
Also, I want to take a second and say, whichever way this issue breaks, I made the right call in #15, since making this decision too hastily would have broken backward compatibility if I decided it was a mistake down the line - if this change is implemented, it can be rolled out gradually, with the old convention remaining (for the foreseeable future) forward-compatible. |
Okay, I just did a quick preliminary test of this on sandbox with |
Actually, I'm thinking something more like this:
|
Note that there's some other really interesting discussion about the future of |
Moving the sorted-plugin-file-listing (with an arbitrary parameter for the part that is currently hardcoded to |
In response to #15 (comment), and with the current discussion in #65 taken into account, I'm reconsidering the idea of adding
plushook
's directory (either$PLUSHU_ROOT/lib
as it is now, or moving it to$PLUSHU_ROOT/bin
or a new directory like$PLUSHU_ROOT/lib/bin
) to$PATH
.Unlike the situation when #15 was originally written (and especially its final comment), as detailed in #65,
$PLUSHU_ROOT
is not a core part of modern Plushu plugin code - in fact, in light of plugin profiles (as implemented circa #41 and #37 (comment)),$PLUSHU_ROOT
is almost never referenced after the profile step, apart from calls toplushook
.Implementing this would not only fix one of the longest-standing ugliness/oddities of core Plushu plugin development (the most important command in the entire system being a variable-expanded quoted string), it would also provide a fair degree of flexibility in future refactors (including - holy cow I just realized this - allowing superplugins to override hooks, the long-thought-lost golden-calf-holy-grail of #45).
If implemented, this would be done using
$PLUSHU_ROOT
at the beginning ofplushu
- not using the user's home directory, or any Bash profile scripts. (I think part of why #15 was so dubious about modifying $PATH was because I didn't understand how the environment works for the call stack as well back then as I do now.) Moreover, the changing of$PATH
like this would probably be implemented as part of what is currentlylib/profile.sh
, the source fragment script that sets the defaults for$PLUSHU_ROOT
and$PLUSHU_USER
(to facilitate instances where the Plushu ecosystem has to be entered from the side, like plushu/plushu-startup-deploy-all#2, so that they will work just as seamlessly).The text was updated successfully, but these errors were encountered: