psibi / justl.el

Major mode for driving just files.
GNU General Public License v3.0
65 stars 13 forks source link

Add support for executing recipes in vterm #55

Closed skissue closed 3 months ago

skissue commented 3 months ago

As proposed in #54.

I just went ahead and chose v and V as the keybinds since they made sense to me, but I'm open to changing it if desired. RIght now the keys are always bound and then vterm's presence is checked when the commands are called (via require); I'm not sure if this is the best way to support this as an "optional" feature, so I'm open to feedback on that as well.

skissue commented 3 months ago

I went ahead and changed it to use the justl-shell option, which defaults to eshell, and converted justl-exec-eshell into a generic justl-exec-shell function. I'm not sure if the code is the cleanest it could be :sweat_smile:, but everything seems to be working for me.

Additionally, I'm wondering whether an obsolete alias should be added for justl-exec-eshell, since the function has been renamed :thinking:.

skissue commented 3 months ago
  • Define new function justl-exec-vterm and justl-no-exec-vterm similar to how you did before.

Done.

  • Create new function justl-exec-shell and justl-no-exec-shell as you have defined in the latest commit. This function should call the apprpriate functions based on the justl-default-shell variable.

Done. I updated the default keybinds to use these functions.

The main motivation is to make it easier to add support for other shells.

I agree that this is a better approach to accomplish this goal.

Let me know if there are any other changes you'd like me to make.

psibi commented 3 months ago

Thank you!