{"action":"created","issue":{"url":"https://api.github.com/repos/plushu/plushu/issues/66","labels_url":"https://api.github.com/repos/plushu/plushu/issues/66/labels{/name}","comments_url":"https://api.github.com/repos/plushu/plushu/issues/66/comments","events_url":"https://api.github.com/repos/plushu/plushu/issues/66/events","html_url":"https://github.com/plushu/plushu/issues/66","id":81726149,"number":66,"title":"Making `plushook` a bare command (modifying $PATH, take 2)","user":{"login":"stuartpb","id":572196,"avatar_url":"https://avatars.githubusercontent.com/u/572196?v=3","gravatar_id":"","url":"https://api.github.com/users/stuartpb","html_url":"https://github.com/stuartpb","followers_url":"https://api.github.com/users/stuartpb/followers","following_url":"https://api.github.com/users/stuartpb/following{/other_user}","gists_url":"https://api.github.com/users/stuartpb/gists{/gist_id}","starred_url":"https://api.github.com/users/stuartpb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stuartpb/subscriptions","organizations_url":"https://api.github.com/users/stuartpb/orgs","repos_url":"https://api.github.com/users/stuartpb/repos","events_url":"https://api.github.com/users/stuartpb/events{/privacy}","received_events_url":"https://api.github.com/users/stuartpb/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/plushu/plushu/labels/under%20consideration","name":"under consideration","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-05-28T02:44:19Z","updated_at":"2015-06-08T00:05:50Z","closed_at":null,"body":"In response to https://github.com/plushu/plushu/issues/15#issuecomment-51609197, 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`.\r\n\r\nUnlike 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 https://github.com/plushu/plushu/issues/37#issuecomment-55263892), `$PLUSHU_ROOT` is almost *never* referenced after the profile step, apart from calls to `plushook`.\r\n\r\nImplementing 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).\r\n\r\nIf implemented, this would be done using `$PLUSHU_ROOT` at the beginning of `plushu` - *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 currently `lib/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)."},"comment":{"url":"https://api.github.com/repos/plushu/plushu/issues/comments/109815550","html_url":"https://github.com/plushu/plushu/issues/66#issuecomment-109815550","issue_url":"https://api.github.com/repos/plushu/plushu/issues/66","id":109815550,"user":{"login":"stuartpb","id":572196,"avatar_url":"https://avatars.githubusercontent.com/u/572196?v=3","gravatar_id":"","url":"https://api.github.com/users/stuartpb","html_url":"https://github.com/stuartpb","followers_url":"https://api.github.com/users/stuartpb/followers","following_url":"https://api.github.com/users/stuartpb/following{/other_user}","gists_url":"https://api.github.com/users/stuartpb/gists{/gist_id}","starred_url":"https://api.github.com/users/stuartpb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stuartpb/subscriptions","organizations_url":"https://api.github.com/users/stuartpb/orgs","repos_url":"https://api.github.com/users/stuartpb/repos","events_url":"https://api.github.com/users/stuartpb/events{/privacy}","received_events_url":"https://api.github.com/users/stuartpb/received_events","type":"User","site_admin":false},"created_at":"2015-06-08T00:05:50Z","updated_at":"2015-06-08T00:05:50Z","body":"Note that there's some other really interesting discussion about the future of `plushook` happening in #62"}}