focus-editor / focus

A simple and fast text editor
GNU General Public License v3.0
1.81k stars 99 forks source link

Focus does not appear to inherit env variables on OSX. #469

Open JesseRMeyer opened 1 day ago

JesseRMeyer commented 1 day ago

On MacOS 15.1.1, using the default zsh shell, I noticed that Focus does not appear to inherit modifications to either .zprofile or .zshrc, in particular, to the PATH environment variable.

As a test I ran 'printenv' as the build_command, and it shows having not been modified. Sublime Text however does pick this up "out of the box" without special configuration. I don't know if this is a bug or a feature request, but I don't even know how to inform Focus of these environment variable changes.

focus-editor commented 1 day ago

I wonder if Sublime Text has custom code which looks for .zshrc etc and reads it.

Or maybe there's a custom startup script which sources the config files

focus-editor commented 1 day ago

As a workaround it should be possible to launch the editor via a script like this:

#!/bin/zsh
source ~/.zshrc
/path/to/focus