If my XML Plistfile in ~/Library/LaunchAgents is calling a shell script, I typically set the PATH (path) in my scripts as well as at times use the fully qualified pathname of the executable.
When using Launch Agents and Launch Daemons, I highly recommend reading the manual pages for launchctl, launchd.plist and launchd.
You can read the manual page for command in Terminal by typing command and then right-click on it and select: Open man Page
.zshrc is a file run when you start an interactive zsh shell, found in your home directory. The error message says you have an export command which is written incorrectly on line 48. not valid in this context means you're trying to export something that's not a variable. It looks like you're trying to add stuff to your PATH, but are substituting the current path inside the zshrc file. Check that line in the file, there's probably a line along the lines of:
Best Answer
You can use the following for example:
Add it to your XML Plist file in an appropriate manner so it doesn't break the other key groups.
I'd place it at the top of the XML Plist file, for example:
Then the rest of your XML Plist file.
Notes:
If my XML Plist file in ~/Library/LaunchAgents is calling a shell script, I typically set the
PATH
(path
) in my scripts as well as at times use the fully qualified pathname of the executable.When using Launch Agents and Launch Daemons, I highly recommend reading the manual pages for
launchctl
,launchd.plist
andlaunchd
.command
in Terminal by typingcommand
and then right-click on it and select: Open man Page