Hi, all.
I couldn't find anything that deals with this in the manual.
I've got a project in /opt/local & I can't edit it or make changes in TxMt because of permissions.
Is there anyway 'round this?
Cheers,
Phil...
sudo mate /path/to/file from the terminal perhaps?
On 27 November 2011 11:37, Phil Dobbin phildobbin@gmail.com wrote:
Hi, all.
I couldn't find anything that deals with this in the manual.
I've got a project in /opt/local & I can't edit it or make changes in TxMt because of permissions.
Is there anyway 'round this?
On 27/11/11 02:47, "Mark Livingstone" livingstonemark@gmail.com wrote:
sudo mate /path/to/file from the terminal perhaps?
That works. I was sceptical about using that as when doing the same in BBEdit, it opens the file but when you come to write changes it asks you for your admin password & I didn't know whether TxMt operated similarly (should've just tried it I guess...).
Thanks,
Phil...
On Sun, Nov 27, 2011 at 02:37, Phil Dobbin phildobbin@gmail.com wrote:
I've got a project in /opt/local & I can't edit it or make changes in TxMt because of permissions.
Is there anyway 'round this?
I see three options:
1. Fix the permissions. Seriously. If you're working on it, grant yourself write access on it.
2. Edit it in TextMate anyway. When saving, TM should ask you for an admin name and password and then Do The Right Thing.
3. In your shell, make sure that EDITOR is set to `mate_wait` (and that `mate_wait` exists in your PATH and is a symlink to `mate`), then use `sudo -e /path/to/file` to edit individual files.
But to be honest, anything other than option 1 is just jumping through unnecessary hoops.
HTH, Martin