Youtube-dl shell script M1 Mac

Well, you could copy it automatically then: Make a macro that looks for the path string in the file you consider the file with the "correct" path in it (e.g. .zshrc or whatever) and saves it to your ENV_PATH var.

But somehow I don't really understand the problem. Unless you have dozens of Macs, it shouldn't be too time-consuming to set Keyboard Maestro's ENV_PATH on each machine.

This is something you do once in the life of a Mac, or at max once or twice more (as in your case, if you want to add an extra path for a program, or if, for example, the path used by your package manager has changed, or you start using a different package manager).

And don't forget, for special paths that are only used by one thing, you can always explicitly set it in the macro where you need it, without touching the ENV_PATH. (You can also make this conditional, depending on the type of Mac, so you can sync the macros.)

Btw, if you're looking for a more global path source, /private/etc/paths or /private/etc/paths.d/ doesn't work for this.

Hello Tom :wave:

Thanks about this little reminder - totally forgot about that possibility ā€¦ Iā€™ve corrected my post above :arrow_up: since I somehow messed it up before posting and saw your reply.

If you wanted to go really crazy on using different $PATH configurations without combining them to one with sync enabled there is also a way for sure - but every macro that uses the ENV_PATH Variable needs know if it can use the setup for the particular Mac first and then youā€™ll have make sure that every other Macro is paused until the ENV_PATH could be set to the Value that is needed.

But this is a cumbersome way that would need to be configured absolutely reliableā€¦ and it is not really a timesaver if you work with more than one machine simultaneously and two would have to wait for the third one has finishes its operation so that the Variable could then be set to another $PATH.

If you would like to know about what goes on on each machine because everything thing is in a chain - then I this maybe makes more sense but I would say ONLY for debugging purposes.

I hope this makes sense in some kind of way because I donā€™t really want to go into much more detail about this.

I think @hayleyh now has mute than enough information - and needs to decide which kind of setup makes more sense for his/her use case.

Anyway - Iā€™m out for today ā€¦

Greetings from Germany

Tobias

Thanks for the detailed responses. My goal isn't to sync between dozens of macs, it's to share the macros I made with others and have them just work without having to explain how to get the path from the terminal and input that into KM. Homebrew seems to be installed in different places depending on the mac. I've tried creating a catch all that would work no matter which mac but in my testing with the computers I have access to it hasn't worked, it seems it works only when I match the exact output from the terminal for that computer.

My background is video editing, I have a very vague understanding of what any of this path stuff actually is and the people I'm trying to share my macro with have even less. If I have to prompt them as part of the setup of my macro to fill out the ENV_PATH variable manually then so be it but I would prefer to avoid adding complex steps into this setup.

Truly my ideal setup would be for the macro to install homebrew, yt-dlp, and ffmpeg automatically when the macro first runs, but I can't figure out how to do something that complex so I'm already going to have to write up a guide on how to install those things to people who have likely never used the terminal before... hence my hope that I could just use KM to grab whatever it can for stuff like this.

Hopefully that clarifies my use case a bit more. Thanks again for your responses.

Okay, just realized a dumb error on my part. During my testing I couldn't create a working catch all ENV_PATH variable because I was setting the variable ENV_Path not ENV_PATH. Setting ENV_Path APPEARED to change the ENV_PATH variable but clearly there is a distinction because it would not run my scripts when I set the variable this way. This is a weirdly invisible distinction in KM, but all good now. Hoping I can eliminate the need to set a distinct ENV_PATH on each computer now.