ivaaaan / smug

Session manager and task runner for tmux. Start your development environment within one command.
MIT License
712 stars 29 forks source link

initial implementation of stop-within-session without name #92

Closed benyanke closed 2 years ago

benyanke commented 2 years ago

This PR closes #84.

It accomplishes this with two main changes:

Env Vars

It adds three env vars to all smug-created tmux sessions.

Config parser

If the --file arg is not specified, but $SMUG_SESSION_CONFIG_PATH is set, the value of the env var is put into the --file value variable, allowing all normal commands that would work with --file manually specified to work automatically within a smug session. This lets smug be aware of it's current context if existing within a smug session, and operate on it by default unless you force it to do something else. For example, smug stop or smug edit work without any additional args.

benyanke commented 2 years ago

I should note - I haven't updated tests for this yet, but if you like the idea and the implementation, I can do that.

ivaaaan commented 2 years ago

Hey. Please lt me know if you have time to finish this :) Otherwise I can take it

ivaaaan commented 2 years ago

95 I have merged this. Thanks for your work @benyanke!

benyanke commented 2 years ago

Sorry I didn't get around to finishing this up for you, but it looks awesome! Thanks for taking my idea and half-implementation and running with it.