StephenLL Posted September 18 Share Posted September 18 Is there a way to directly reference Bash or zshell environment variables in Alfred? Something like {my_var} ? If not, please consider adding a feature like that in the future. I have environment variables that are set in zshenv that are used by many programs and I would like to use these inside in Alfred as well. Link to comment
vitor Posted September 18 Share Posted September 18 Welcome @StephenLL, See Understanding the Scripting Environment which explains this in detail. Link to comment
StephenLL Posted September 18 Author Share Posted September 18 Thank you for the reference. I saw that page but honestly didn't understand it. I have a Workflow that utilizes a path, specifically the Browse in Alfred . I'd like to grab the path from an environment variable set in .zshenv and use it where you set the Browse Path. Link to comment
vitor Posted September 18 Share Posted September 18 Before the Browse in Alfred, add a Run Script with default settings and code: source "${HOME}/.zshenv" printf "${YOUR_VARIABLE}" Replacing YOUR_VARIABLE with the real name. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now