ivaaaan / smug

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

[Question] How would I go about using variables from a .env file ? #81

Closed cocoonkid closed 2 years ago

cocoonkid commented 2 years ago

I like to create a .env file within the same folder as the yaml and use it to declare the variables to use inside the project maifest.

Thanks in advance!

ivaaaan commented 2 years ago

Hi. I don't think smug will support .env files. Your current environment variables are available in a new tmux session after smug start. So you can do source .env and then smug start. Or you can put source .env in the before_start section.

cocoonkid commented 2 years ago

@ivaaaan I see . The idea was to be able to add for example:

commands:
    -sudo nmap -sA {target} 

and have {target} be fillled by the .env file.

This would be tremendously useful for power users.

ivaaaan commented 2 years ago

I think it makes sense to allow it to use the shell environment, but I don't think .env files will be supported. I want to keep smug simple.