PATH Configuration – How to Add gedit to Your PATH in macOS

path

I finally made the jump and got a MacBook, and I'm trying to move in. I have the OSX port of gedit installed, but I'm having trouble adding it to my PATH. My current PATH looks like this:

export PATH=/opt/local/bin:/Applications/gedit.app/Contents/MacOS/gedit:/opt/local/sbin:$PATH

as per a comment here.

Best Answer

You only need to add the path to the folder containing the gedit binary, not the path to the binary.

Try this

export PATH=/opt/local/bin:/Applications/gedit.app/Contents/MacOS:/opt/local/sbin:$PATH